•
•
•
•
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 361,044 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 2,059 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: 14034 | Replies: 1
![]() |
•
•
Join Date: Apr 2005
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
hi there,
can anyone help me out
my problem is this:
I have a form, with radio buttons (the number of buttons is not fixed, it will keep increasing)
for eg, if there are 2 radio buttons and no button is checked then
if user checks a radio button, then i should display a message saying that
"You have selected the value"
but if already one radio button is selected and he is selecting the other button, I should display the confirmation message asking him "Whether he wish to change the value"
I am not able to display different alert messages for radio buttons checked or unchecked
(the code for changing etc are done in asp)
I am a novice to javascript..
Can u pls help me out on this
Thanks in advance
Regards
can anyone help me out
my problem is this:
I have a form, with radio buttons (the number of buttons is not fixed, it will keep increasing)
for eg, if there are 2 radio buttons and no button is checked then
if user checks a radio button, then i should display a message saying that
"You have selected the value"
but if already one radio button is selected and he is selecting the other button, I should display the confirmation message asking him "Whether he wish to change the value"
I am not able to display different alert messages for radio buttons checked or unchecked
(the code for changing etc are done in asp)
I am a novice to javascript..
Can u pls help me out on this
Thanks in advance
Regards
•
•
Join Date: May 2005
Location: Wellington, New Zealand
Posts: 182
Reputation:
Rep Power: 4
Solved Threads: 3
I suspect you'll need to set a flag indicating whether a user has already checked a radio button...
Then attach an event to each radio, so when the user selects it it checks the flag.... if its true, then alert: "You have selected the value"
else: prompt: "Whether he wish to change the value"
I sugest a less gender specific prompt... your love life will improve... unless you are a girl.. in which case it would make little difference...
please don't flame me.. i've been on drugs for a minor operation today...
Then attach an event to each radio, so when the user selects it it checks the flag.... if its true, then alert: "You have selected the value"
else: prompt: "Whether he wish to change the value"
I sugest a less gender specific prompt... your love life will improve... unless you are a girl.. in which case it would make little difference...
please don't flame me.. i've been on drugs for a minor operation today...
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- An array of arrays of of radio buttons (JavaScript / DHTML / AJAX)
- javascript radio buttons and insanity (JavaScript / DHTML / AJAX)
- dynamically generated textboxes & radio buttons php, insert into db (PHP)
- IE6 - dialogue boxes , check boxes and radio buttons work very slowly after hijacking (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Using "variable variables" in Javascript
- Next Thread: Javascript Arrays


Linear Mode