• sForceRoshan
  • NEWBIE
  • 0 Points
  • Member since 2009

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

I am a nebbie trying do the following.

 

1) I have a custom field called test_account_id and test_campaign_id in the account tab

2) when a user inputs a  value in test_account_id I need a call to e.g. https://www.test.com?value= test_account_id__c which is a GET request.

3) the returned reults which is json will populate the  test_campaign_id

 

So....how do I do that?

 

This will be soooo much help for helping me to understanding with working APEX bettter.

 

Code that I can copy and paste will be great...

 

Thanks

I  have two selectList,list1 and list2. the option of list2 is add according the selected item in list1 automaticly in javascript.

the code is:

 

<script>
 var hotel=new Array();
 var brand=new Array();
 var type=new Array();
 <apex:outputText escape="false" value="{!MyHotel}"></apex:outputText>
 <apex:outputText escape="false" value="{!MyBrand}"></apex:outputText>
 <apex:outputText escape="false" value="{!MyType}"></apex:outputText>
function list2(list2id,n)
{
 var list=document.getElementById(list2id);


 for(var i=list.length-1;i>=0;i--)list.remove(i);
 for(var i=0;i<hotel.length;i++)
 list.add(new Option(hotel[i],hotel[i]));
 }
</script>
<apex:outputPanel id="result">
<apex:form >
<b>Report By: </b>
<apex:selectList id="list1" multiselect="false"  size="1" value="{!reporttype}"  onchange="list2('{!$Component.list2}');">
<apex:selectOption itemValue="1" itemLabel="Hotel"></apex:selectOption>
<apex:selectOption itemValue="2" itemLabel="Hotel Brand"></apex:selectOption>
<apex:selectOption itemValue="3" itemLabel="Hotel Type"></apex:selectOption>
</apex:selectList>
<b>Please select :</b>
<apex:selectList id="list2" multiselect="false" size="1" value="{!reportby}">
</apex:selectList>
<apex:commandButton value="Go!" action="{!doSearch}" status="status"  reRender="result"/>

<apex:form>

</apex:outputPanel >

 

the problem is I can't get the value of reportby in my apex, where is the problem?