This is a discussion on "[SOLVED] large radio button form submit" within the JavaScript Forum section. This forum, and the thread "[SOLVED] large radio button form submit are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] large radio button form submit
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hi guys i need some advice on how to get my javascript running correctly
I have a large HTML radio button form with multiple radio button groups (40 groups 4 radio buttons per group), i have a javascript funtion which will check the radio buttons once the submit button is pressed however the code never gets past the first radio button, i dont know how to change the code so that it will dispaly all the results from the quiz. Any help would be greatly appreciated File attatched. |
|
|
|
#2
|
|||
|
|||
|
Re: large radio button form submit
You have to use "document.form1.question1[0].checked". So just add "document." in front of all form1!
You should also change the action pointing to the JavaScript. Use action="" OnSubmit="checkAnswers();" Have fun! |
|
#3
|
|||
|
|||
|
Re: large radio button form submit
sadly that did not work it still only displayed the result of the first question
|
|
#4
|
||||
|
||||
|
Re: large radio button form submit
You should create an array with your answers and then cycle through the array.
Here's a start...
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#5
|
|||
|
|||
|
Re: large radio button form submit
again sadly only the first result is printed, ive attatched the page with the new code
|
|
#6
|
||||
|
||||
|
Re: large radio button form submit
Of course! Silly me!
![]() Try this
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#7
|
|||
|
|||
|
Thank you sooooooo much that has annoyed me for a day (im not the best at programming lol I owe you a pint |
|
#8
|
||||
|
||||
|
Re: large radio button form submit
No problems, everyone started programming somewhere
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Radio Button Response! :( | jahphill | PHP Forum | 33 | Oct 25th, 2007 22:15 |
| redirecting form based on radio button values | c_martini | JavaScript Forum | 7 | Oct 9th, 2007 10:26 |
| How do i submit a form with radio buttons ? | Accurax | Web Page Design | 5 | May 12th, 2007 18:34 |
| Help needed with creating a radio button form | sing2trees | PHP Forum | 1 | Nov 13th, 2006 05:52 |
| problem with radio button in form validation | augustus_emperor | JavaScript Forum | 1 | Apr 22nd, 2004 13:08 |