yorkie107
06-26-2004, 10:42 AM
Hi,
I'm new to java script and I'm having a problem with writing a variable to store a selected item of a drop down list box. Do I have to write a condition statement like I have had to for the radio buttons I have used, if so how would I word it, for my radio buttons I used;
if (document.forms[0].sex.checked)
gender = "male";
else
gender = "female";
could I use something simlar to this.... if I did this could I just declare the variable simply as var colour as colour is the name of my drop down list box.
Many thanks.
Yorkie107
I'm new to java script and I'm having a problem with writing a variable to store a selected item of a drop down list box. Do I have to write a condition statement like I have had to for the radio buttons I have used, if so how would I word it, for my radio buttons I used;
if (document.forms[0].sex.checked)
gender = "male";
else
gender = "female";
could I use something simlar to this.... if I did this could I just declare the variable simply as var colour as colour is the name of my drop down list box.
Many thanks.
Yorkie107