English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am using a page with

element having all the input elements inside a
.













Now, I want to see if a user has selected the value of 'q1'. But, JavaScript
is not accessing 'q1' or 'q2', etc.

2006-09-26 02:53:23 · 5 answers · asked by John 1 in Computers & Internet Programming & Design

5 answers

"document.form1.q1.selected" returns 1 if 'q1' is selected.

2006-09-26 03:46:59 · answer #1 · answered by Lunatic T 2 · 0 0

the way I do it is with PHP. Iset the action='readform.php'

and in the you can use the code to access the value of the names q1, q2.

this is server side and js is client side. not really sure with what you showed. maybe show all the code to get a better understanding,

good luck
ron

2006-09-26 03:09:57 · answer #2 · answered by ? 3 · 0 0

PHP would be much better for this project, but JavaScript will work fine as well. Heres a sample of what I think you're after without div tags:





















---------------------------------------

You may want to do a search for JavaScript form validation. There you'll find a plethera of solutions for what you're after.

2006-09-26 03:41:22 · answer #3 · answered by rob 3 · 0 0

I would have to see your script to know why its not working, but you should be able to access the values of the radios through the form's elements property:

2006-09-26 04:04:33 · answer #4 · answered by John J 6 · 0 0

highway Warriors The spectacular Freebirds The hour of darkness exhibit Rick & Scott Steiner The Dudley Boys The Hart commencing place The Rock and Roll exhibit Arn Anderson & Tully Blanchard The British Bulldogs The Von Erichs

2016-12-18 17:14:00 · answer #5 · answered by Anonymous · 0 0

fedest.com, questions and answers