I created a VF page with input fields of Account Object. I created a select list on Vf page using controller. I want to update the input field(selected__c : datatype--text) with selected option in select list.

So My question is how to write java script to make it work ?

  • You can do this in a few ways, paste some code so we get an idea of what you would like to do :) – Tim Jan 14 '16 at 19:26

We can do this using two different approach :

  1. Using Actionfunction of VF and then rerender the outputPanel containing our text field https://developer.salesforce.com/forums/?id=906F000000096tTIAQ
  2. using Javascript to input the text in text input https://stackoverflow.com/questions/1085801/get-selected-value-in-dropdown-list-using-javascript

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.