If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Javascript help - challenging!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-06-03, 06:44
rnavanee rnavanee is offline
Registered User
 
Join Date: Jul 2003
Location: Chennai
Posts: 11
Javascript help - challenging!!

I need to write a javascript function with onClick() for the radio button or checkbox. I have a situation in which :
1. I should be able to select select a group of radiobuttons if their parent radio button is selected
2. I should be able to select a single radio button from only one group.

Example:
<input type="radiobutton" name="parentA"> ...
<input type="radiobutton" name="childA1"> ...
<input type="radiobutton" name="childA2"> ...

<input type="radiobutton" name="parentB"> ...
<input type="radiobutton" name="childB1"> ...
<input type="radiobutton" name="childB2"> ...
<input type="radiobutton" name="childB3"> ...
...


If the radiobutton corresponding to "parentA" is clicked then all "childA1", "childA2" should be selected.

If user has selected "childA1" and then if he clicks "childB1", then "childA1" has to deselected and "childB1" has to selected.


Can any one help me in this regard?


Thanks in advance
Navanee

Last edited by rnavanee; 08-06-03 at 06:49.
Reply With Quote
  #2 (permalink)  
Old 08-27-03, 18:29
Shores Shores is offline
Registered User
 
Join Date: Aug 2003
Location: Bologna - Italy
Posts: 209
You should look at the disabled and/or readOnly attributes of the element you want to disable or render read only:

document.forms[0].elements["childA1"].disabled=true;

Bye!
__________________
The only failure is not trying to do it.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On