RE: [PHP-DB] Pb to submit a form
| From: | Sanders, Nicholas | Date: | Thu, 19 Oct 2000 16:03:03 +0000 |
| Subject: | RE: [PHP-DB] Pb to submit a form | ||
| Groups: | php.db php.windows | ||
| Request: | Send a blank email to php-db+get-3798@lists.php.net to get a copy of this message | ||
Try
document.myform.elements["languages[]"].selectedIndex
-----Original Message-----
From: scesbron@escna.fr [mailto:scesbron@escna.fr]
Sent: 19 October 2000 16:55
To: php-windows@lists.php.net
Cc: php-db@lists.php.net
Subject: [PHP-DB] Pb to submit a form
Hi everybody,
I've got a huge problem and I don't know how I can solve. I hope that you
guys can help me.
I'd like to test a form to know if all fields are well fullfill before
sending this form to my php script.
The pb comes with a multiple select statement.
To be able to test it in Javascript, I should have :
<select multiple name="languages"> and I can do
document.myform.languages.selectedIndex to know if something was selected.
But if I do so, I can only read the last selected option in my php script.
The pb is that to be able to read all selections, that user made, from my
php script I should have :
<select multiple name="languages[]"> and so I can't test it in javascript
( document.myform.languages.selectedIndex doesn't work
document.myform.languages[].selectedIndex doesn't work neither
document.myform.(languages[]).selectedIndex doesn't work neither )
Is anybody aware of this and know how I can solve it ?
Stéphane
Stéphane Cesbron
Chargé du développement Internet/Intranet
AUDENCIA
Nantes.Ecole de Management
8 route de la Jonelière
B.P. 31222
44312 Nantes Cedex 3
Tél : 02.40.37.34.47
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net