domuk
09-12-2003, 09:28 AM
Hi,
I have a dropdown menu and am having problems with converting the result of the onChange fn. to v1*0.01 if the mv option is selected and v1*1 if the V is selected.
Working example code of something similar would be usefull.
Thanks i advance.
Dom..
function shovol() {
vol(); document.forms[0].v1.value=volc
}
<select name="volts" size="1" onChange="shovol(); return false;">
<option value="000.0">mV</option>
<option value="1">V</option>
<option value="1000">KV</option>
<option value="1000000">MV</option>
I have a dropdown menu and am having problems with converting the result of the onChange fn. to v1*0.01 if the mv option is selected and v1*1 if the V is selected.
Working example code of something similar would be usefull.
Thanks i advance.
Dom..
function shovol() {
vol(); document.forms[0].v1.value=volc
}
<select name="volts" size="1" onChange="shovol(); return false;">
<option value="000.0">mV</option>
<option value="1">V</option>
<option value="1000">KV</option>
<option value="1000000">MV</option>