• Raj_SF
  • NEWBIE
  • -1 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi,
I have created one VF page (Name: vfPageOne) and having my controller to populate data for that VF page. I have defined the "contentType="text/javascript"" for the VF page so that I can include this VF page into another VF page.

I have create another VF page (Name: vfPageTwo) and including 'vfPageOne' into this second VF page.

Here is my code snippet of 'vfPageOne' is.
#*******************************************
<apex:page controller="ctrlOne" contentType="text/javascript">

    <script>
    var srchInput = {!srchData};   // {!srchData} is coming from controller in JSON format.
        alert({!srchData});
    </script>
</apex:page>
#*******************************************


Here is my code snippet of 'vfPageTwo' is.
#*******************************************
<apex:page controller="ctrlTwo">
    <apex:includeScript value="apex/PPF_SearchKeywords"/>
    <script>
         alert(srchInput);
    </script>
    <apex:form >
    <apex:inputText value="{!srchKeyword}" id="srchbox1"/>
    </apex:form>
</apex:page>
#*******************************************

I am trying to access js variable 'srchInput' from 'vfPageTwo' which got populated in 'vfPageOne'. In 'vfPageTwo', i could see the values. But in VF page two, alert() is saying undefined for 'srchInput'. I could have done away with one vf page and controller, but I want to reduce the viewstate size of second VF page.

Let me know how I can achieve this.

  • January 21, 2013
  • Like
  • 0

I am newbie to salesforce.com development and I am not able to connect using Force.com IDE or Eclipse with Force Plugin.

 

Everytime i try i get an error saying

 

Unable to connect to hostname 'www.salesforce.com'

Invalid username,pwd,security token or user locked out.

Please verify/change your credentials.

 

I just created my login yesterday and was able to create tabs and objects using browser but not with IDE.

 

I resetted by securtiy token three times and combined with password but still no luck.

 

Everywhere i search i couldnt find a definitive answer.

 

Could some one please help me in connecting from Force.com IDE.

 

I just signed up as a developer and i am not associated to any company.

 

Any help would be appreciated