Topic awaiting preservation: validating radio buttons |
|
---|---|
Author | Thread |
Nervous Wreck (II) Inmate From: Ny |
posted 03-09-2005 19:55
Hi. I am having a real problem with this. I just can't understand this coding. |
Paranoid (IV) Inmate From: France |
posted 03-09-2005 20:24
Radio buttons have the same id/name but are separete elements. You must browse each radio button element, test the checked property of those with the id you want to validate. If the value is true for one of them, you're done. |
Paranoid (IV) Mad Librarian From: Glienicke |
posted 03-09-2005 20:46
Some more pointers on how to deal with radio buttons in JS: |
Nervous Wreck (II) Inmate From: Ny |
posted 03-09-2005 21:47
I feel so dmb today. This is what I have so far. Now do I put the array under this? I am still a beginner and some things are still fuzzy to me. |
Paranoid (IV) Inmate From: France |
posted 03-09-2005 22:38
Does your code work somewhere else than in IE if at all ? code: function process() You should have a look at the Real questions for real people. threads. It contains some pointers to some usefull ressources to get started with JavaScript. Among which there is the reference of JavaScript 1.3 in PDF featuring a list of the objects ( such as the form, input, Date, Math, ... ) available. |
Nervous Wreck (II) Inmate From: Ny |
posted 03-09-2005 23:26
Hey poi thanks for the code. I can't get it to work for some reason. I edited where I was suppose to but no error message comes up when I submit the form. Here is my JS coding with your code edited for my form. |
Paranoid (IV) Inmate From: France |
posted 03-10-2005 00:49
you realize that you pasted my function in the middle of your function. There's no chance that my function is executed in these conditions. |
Nervous Wreck (II) Inmate From: Ny |
posted 03-10-2005 01:58
Okay well I moved the code down into it's own script section. It still doesn't work. I'm very slowwww this week because I'm sick so I guess I'm just not getting it. |