dynamic value for html:option
1 posts in topic
Flat View  Flat View

Posted By:   sa_pa
Posted On:   Monday, June 27, 2005 01:32 PM

Hi Everybody,

I have a drop down list which has some fixed number of commands. I need to show or hide commands depending upon the selection. I have a javascript which does this.

But, I need to remember the selected option for further processing. I have a hidden field which holds the value of current selected option.

How do I change the value for selected option onChange?



Re: dynamic value for html:option

Posted By:   alan_do  
Posted On:   Monday, June 27, 2005 04:52 PM

onChange call a js function that sets the hidden form field value... form1.hiddenFormField.value = newValue ...

if you want to actually select the drop down option, onChange you need to iterate through the dropdown (using javascript) and make the select when the iteration hits that value (you'll need to look up source codes online).

About | Sitemap | Contact