praneetha
asked on
print Selected value from Select in HTML
if i have this in my ascx
<select id="testList" name="testList" >
<options>
;;
;;;
</select>
and in same ascx i would like to print the selected value how do i do it.
<td colspan="1">
<% print the select value here? %>
</td>
<select id="testList" name="testList" >
<options>
;;
;;;
</select>
and in same ascx i would like to print the selected value how do i do it.
<td colspan="1">
<% print the select value here? %>
</td>
Like this:
<select id="testList" name="testList"
onChange="document.getElementById('cellID').innerHTML=this.options[this.selectedIndex].value">
<options>
.
.
.
</select>
<td colspan="1" id="cellID"></td>
can you specify more details. is my help welcomed ?
I guessed Print as in show... Not as in print on printer
ASKER
CountryName = formObj.CountryList.option s[document .forms['fr m'].Countr yList.sele ctedIndex] .text;
document.getElementById("c ountryName ").innerHT ML=htmlEnc ode(Countr yName);
document.getElementById("c
no objection
So the code I suggested was correct.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
waiting for reply from the author
We got the reply: delete question
Yes objections.
My code answered the question and the last comment showed how to use the code in the actual setting.
My code answered the question and the last comment showed how to use the code in the actual setting.
after reviewing ... mplungjan .. deserves points...
i agree on that
i agree on that
please more details
waiting for your reply