Forums
This topic is locked
Radiobutton to reset Dropdown list
Posted 19 Dec 2002 22:42:22
1
has voted
19 Dec 2002 22:42:22 Robert Kruse posted:
I've been trying to get my radio button to reset the chosen option in a dropdown menu. My radio button calls the following function:function CanShirt(form) {{
form.Colors.selectedIndex = form.Colors.options[-1];
}}
My radio button:
<input type="radio" name="radiobutton" value="T-Shirt" onclick="CanShirt(this.form)">
Am I on the right track, cause this doesn't work?
Thanks,
Bob
Replies
Replied 15 Mar 2003 02:04:25
15 Mar 2003 02:04:25 Jeremy Neal replied:
Try this instead,
function CanShirt(form) {{
form.Colors.options[form.Colors.selectedIndex-1].selected=true;
}}
Good Luck
JN
function CanShirt(form) {{
form.Colors.options[form.Colors.selectedIndex-1].selected=true;
}}
Good Luck
JN