how can i see the value of a combobox in Javascript
like i write this code and it doesn't worked.
document.frmCart.Carts.options.value=x;
alert(x);
frmCart = Name of form
Carts = Name of Select(ComboBox)
Thanxs all
Printable View
how can i see the value of a combobox in Javascript
like i write this code and it doesn't worked.
document.frmCart.Carts.options.value=x;
alert(x);
frmCart = Name of form
Carts = Name of Select(ComboBox)
Thanxs all
If you give your <OPTION> elements a VALUE attribute you can see the value with something like frmWhatever.selWhatever.value - for example:
<P><SELECT NAME="selTest">
<OPTION VALUE="Red">Red
<OPTION VALUE="Blue">Blue
<OPTION VALUE="Green">Green
</SELECT></P>
<P><BUTTON onClick="alert(selTest.value)">Click Me</BUTTON></P>
Paul