Friends,
I need to write a javascript function (which will be called on
clicking a button) to return the currently selected item from a drop-
down list whose rendered html is below.
<select name="ddlQuery"
onchange="javas cript:setTimeou t('__doPostBack (\'ddlQuery\',\ '\')', 0)"
id="ddlQuery" style="width:27 3px;">
<option value="Munich"> Munich</option>
<option selected="selec ted" value="London"> London</option>
<option value="Paris">P aris</option>
<option value="Tokyo">T okyo</option>
</select>
So in the above case, the javascript should return the string 'London'
which is the selected item.
Can you please advice?
Thanks,
PD
I need to write a javascript function (which will be called on
clicking a button) to return the currently selected item from a drop-
down list whose rendered html is below.
<select name="ddlQuery"
onchange="javas cript:setTimeou t('__doPostBack (\'ddlQuery\',\ '\')', 0)"
id="ddlQuery" style="width:27 3px;">
<option value="Munich"> Munich</option>
<option selected="selec ted" value="London"> London</option>
<option value="Paris">P aris</option>
<option value="Tokyo">T okyo</option>
</select>
So in the above case, the javascript should return the string 'London'
which is the selected item.
Can you please advice?
Thanks,
PD
Comment