You need to sign in to do that
Don't have an account?

Passing the Selected option to VisulaForce Page
I have the following drop down, and I want to send the value of the selected file to my controller .. so if the user selects parent account1 my controller should get that value or if they select parent account2 samething
<label>Select the Region</label> </td> <td class="data2Col" style="border-bottom:0px;"> <select id="sandler" class="sandler" value="{!regionAccount}"> <option value=""></option> <option value='ParentAccount1'>asdf--zz</option> <option value='ParentAccount2'>ggggg</option> </select> </td>
// Recieve the Region Value from Visual Force Page.. public String regionAccount{get;set;} public Account regionAccountId{get;set;} // if regional is not empty if (regionAccount != Null ){ // get the value of region and find the accountId regionAccountId = [select Id from Account where Name = : regionAccount]; account.ParentId =regionAccountId.Id; } else{ for (Contact parents : parentAccount) { System.debug('Now I get to here part 2'); account.ParentId = parents.AccountId; } }
You have to use "<apex:selectList>" instead of <select>. see below example.
Visualforce Page:
Apex Class:
Let me know if you have any question on this. Please mark this "Solved" if it helps.
Thank You,
Hitesh Patel
Email :- hiteshpatel.aspl@gmail.com
http://mrjavascript.blogspot.in/
All Answers
You have to use "<apex:selectList>" instead of <select>. see below example.
Visualforce Page:
Apex Class:
Let me know if you have any question on this. Please mark this "Solved" if it helps.
Thank You,
Hitesh Patel
Email :- hiteshpatel.aspl@gmail.com
http://mrjavascript.blogspot.in/