enabling a radiobutton in javascript

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Nov 2006
Posts: 17
Reputation: santoo is an unknown quantity at this point 
Solved Threads: 0
santoo santoo is offline Offline
Newbie Poster

enabling a radiobutton in javascript

 
0
  #1
Apr 11th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,430
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 232
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: enabling a radiobutton in javascript

 
0
  #2
Apr 11th, 2008
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
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 31
Reputation: AaronASterling is an unknown quantity at this point 
Solved Threads: 5
AaronASterling's Avatar
AaronASterling AaronASterling is offline Offline
Light Poster

Re: enabling a radiobutton in javascript

 
0
  #3
Apr 12th, 2008
Originally Posted by ShawnCplus View Post
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
Aaron Sterling
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 1448 | Replies: 2
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC