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

Display value in input text on VF page depending of dropdown value
Hi All,
I have an input text on VF page. And I have a drop-down. If e.g. "Value1" is selected in drop-down then I need to type value to input text manually. But if "Value2" is selected then the value of input text should be filled in automatically with some value. How can I do this second part?
Thanks!
I have an input text on VF page. And I have a drop-down. If e.g. "Value1" is selected in drop-down then I need to type value to input text manually. But if "Value2" is selected then the value of input text should be filled in automatically with some value. How can I do this second part?
Thanks!
You need to use "rerender" on "onchange" event of selectlist. For this you need to use "<apex:actionSupport>" tag. For ex.
The above code I have pasted is only for Visualforce. You need have an controller method name changeInputText which will modify the value of inputValue variable.
Please let me know if you need further help on this.
Thanks,
Manish