RE: [PHP] Form validation of dynamically generated forms?

From: Date: Tue, 29 Aug 2000 13:55:43 +0000
Subject: RE: [PHP] Form validation of dynamically generated forms?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-14119@lists.php.net to get a copy of this message
You should really use php for form validation, as not everyone switches java on, makes sense really, you are then catering for 100% of your audience. Just send the form results to a new form (same form) and validate the entries there on the server. You get the idea, I hope. Also, your more likely to get a response from this list with a php question. hope this helps, Greg -----Original Message----- From: Chad Day [mailto:cday@beachassociates.com] Sent: 29 August 2000 14:43 To: 'php-general@lists.php.net ' Subject: RE: [PHP] Form validation of dynamically generated forms? Any other replies on this subject? It's been dormant for a bit, and I know people are sick of it and say "it's your javascript!" but it's NOT as that is perfectly valid javascript and works fine in another file when I'm not going through a for loop to generate it. Is it something with the way Netscape reads a page, or a possible bug in Netscape? It even works in K-Meleon and Mozilla for christ's sake. Something is up with Netscape in this and how it reads the page. I would appreciate any help on this, at least just to confirm that it is a problem with Netscape by someone with more knowledge of it, and any possible workarounds to the problem. Chad -----Original Message----- From: Chad Day [mailto:cday@beachassociates.com] Sent: Monday, August 28, 2000 6:16 PM To: 'Grant Walters '; 'Joao Prado Maia ' Cc: 'php-general@lists.php.net ' Subject: RE: [PHP] Form validation of dynamically generated forms? Yes. :( Was one of the many things I tried. Still chokes in Netscape with a document.myForm.QUANTITY# has no properties error. Tried that, myForm., document.myForm., and everything else I could find in Netscape's documentation of javascript. Chad -----Original Message----- From: Grant Walters To: Joao Prado Maia Cc: php-general@lists.php.net Sent: 8/28/00 5:30 PM Subject: RE: [PHP] Form validation of dynamically generated forms? I'm not a Javascript programmer by any means but have you tried referencing variables like this: document.myForm.['QUANTITY1'].value > echo "\t\tif (document.myForm.QUANTITY$x.value == '') {\n"; > > echo "\t\t\talert(\"You must enter a value for the Quantity > > field.\")\n"; > > echo "\t\t\tdocument.myForm.QUANTITY$x.focus();\n"; > > echo "\t\t\treturn (false);\n"; > > echo "\t\t}\n"; > > > Regards GRANT WALTERS Walters & Associates, P O Box 13-043, Johnsonville, Wellington, New Zealand Phone: +64 4 4765175 CellPhone: 025 488265 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#14119) next »