HighDots Forums  

Radio Button Control

Javascript JavaScript language (comp.lang.javascript)


Discuss Radio Button Control in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave F.
 
Posts: n/a

Default Radio Button Control - 10-08-2003 , 10:01 AM






I have three radio buttons grouped together:
<input type="radio" name="MODEL" value="V1" onclick=Enable() checked>Model
V1<br>
<input type="radio" name="MODEL" value="V2" onclick=Enable()>Model V2<br>
<input type="radio" name="MODEL" value="V3" onclick=Enable()>Model V3<br>

And a text field that is populated from a popup window option selector:
<input type="text" name="FABRIC" size="40" maxlength="40" value="" READONLY>

When one of the radio buttons is selected I need to clear a text field
depending which radio button was previously selected.
For example,
If Model V1 is currently selected, and the user selects Model V2, I do not
want to clear a text input field.
If Model V1 is currently selected, and the user selects Model V3, I want to
clear a text input field.
If Model V3 is currently selected and the user selects either Model V1 or V2
I want to clear a text input field.

How can I accomplish this or tell what radio button was previously set?

Thanks,
Dave F.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.