User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,742 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,400 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 762 | Replies: 2
Reply
Join Date: Nov 2006
Posts: 17
Reputation: santoo is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
santoo santoo is offline Offline
Newbie Poster

enabling a radiobutton in javascript

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: New York state
Posts: 465
Reputation: ShawnCplus will become famous soon enough ShawnCplus will become famous soon enough 
Rep Power: 5
Solved Threads: 72
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: enabling a radiobutton in javascript

  #2  
Apr 11th, 2008
Use the onclick attribute with a function along the lines of
  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 z+*
Reply With Quote  
Join Date: Dec 2007
Location: Raleigh, NC
Posts: 31
Reputation: AaronASterling is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
AaronASterling's Avatar
AaronASterling AaronASterling is offline Offline
Light Poster

Re: enabling a radiobutton in javascript

  #3  
Apr 12th, 2008
Originally Posted by ShawnCplus View Post
Use the onclick attribute with a function along the lines of
  1. Function EnableRadioButtons ( array Elements )
  2. For each Element in Elements
  3. Set Element Enabled


Or maybe something along the lines of

  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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 1:33 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC