954,152 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

enabling a radiobutton in javascript

Hi,

I am using 3 radiobuttons which are disabled by default.I want to enable them when i check an other radiobutton on my form.what is the solution for this.

plzz reply.

thanks.

santoo
Newbie Poster
17 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
 

Use the onclick attribute with a function along the lines of

Function EnableRadioButtons ( array Elements )
    For each Element in Elements
        Set Element Enabled
ShawnCplus
Code Monkey
Team Colleague
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
 

Use the onclick attribute with a function along the lines of

Function EnableRadioButtons ( array Elements )
    For each Element in Elements
        Set Element Enabled

Or maybe something along the lines of

Function EnableRadioButtons ( array Elements )
   if  (button of interest is checked) {
      For each Element in Elements
         Set Element Enabled
   }  else {
      For each Element in Elements 
          Set Element Disabled
   }


That way the will become disabled again if the user checks the special button and then unchecks it later

AaronASterling
Light Poster
31 posts since Dec 2007
Reputation Points: 10
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You