jianneng
08-30-2004, 04:10 AM
Hi, I have the following listbox which, together with another javascript, able to perform unit conversions.
So the user enters a value in a textbox, and by selecting for e.g. inch, the value will be automatically converted to its meter equivalent.
<select name="L_Units" class="style4" style="width:61px;" onChange="Units_Conversion1()">
<option selected>m</option>
<option value="mm">mm</option>
<option value="inch">inch</option>
<option value="ft">ft</option>
</select>
Since meter will always be the default unit, I wonder if this is possible: if the user selects millimeter/inch/feet from the listbox, rather than showing the label mm/inch/ft, the listbox label will automatically goes back to m (meter)...?
So the user enters a value in a textbox, and by selecting for e.g. inch, the value will be automatically converted to its meter equivalent.
<select name="L_Units" class="style4" style="width:61px;" onChange="Units_Conversion1()">
<option selected>m</option>
<option value="mm">mm</option>
<option value="inch">inch</option>
<option value="ft">ft</option>
</select>
Since meter will always be the default unit, I wonder if this is possible: if the user selects millimeter/inch/feet from the listbox, rather than showing the label mm/inch/ft, the listbox label will automatically goes back to m (meter)...?