943,548 Members | Top Members by Rank

Ad:
Apr 11th, 2008
0

enabling a radiobutton in javascript

Expand Post »
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
santoo is offline Offline
17 posts
since Nov 2006
Apr 11th, 2008
0

Re: enabling a radiobutton in javascript

Use the onclick attribute with a function along the lines of
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. Function EnableRadioButtons ( array Elements )
  2. For each Element in Elements
  3. Set Element Enabled
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005
Apr 12th, 2008
0

Re: enabling a radiobutton in javascript

Click to Expand / Collapse  Quote originally posted by ShawnCplus ...
Use the onclick attribute with a function along the lines of
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. Function EnableRadioButtons ( array Elements )
  2. For each Element in Elements
  3. Set Element Enabled
Or maybe something along the lines of

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. Function EnableRadioButtons ( array Elements )
  2. if (button of interest is checked) {
  3. For each Element in Elements
  4. Set Element Enabled
  5. } else {
  6. For each Element in Elements
  7. Set Element Disabled
  8. }

That way the will become disabled again if the user checks the special button and then unchecks it later
Reputation Points: 10
Solved Threads: 5
Light Poster
AaronASterling is offline Offline
31 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: script/function to lock a mouse and keyboard.
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Please take a screenshot in IE6 or 7 for yours truly





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC