Re: [PHP-DB] Validating forms
It is much more efficient to do that type of validation client-side, using Javascript. No sense in making another round trip to the server if not necessary. True.. but this only works if your visitor has javascript enabled.. the biggest avantage in serverside scripting IMHO is you can forse things to happen.. Besides, a visitor with a rather old browser might get bombed with javascript errors.. An if .. then loop will do the same but.. serverside. Bye, B. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Validating forms
Do both, javascript and server side validation. Javascript can cut down on unnessary page refreshes. Serverside is the only way to guarentee the results, because of the reasons outlined here. Yes, it's more work, but it will provide a better experience for the end surfer. No? -Joe ""B. van Ouwerkerk"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It is much more efficient to do that type of validation client-side, using Javascript. No sense in making another round trip to the server if not necessary. True.. but this only works if your visitor has javascript enabled.. the biggest avantage in serverside scripting IMHO is you can forse things to happen.. Besides, a visitor with a rather old browser might get bombed with javascript errors.. An if .. then loop will do the same but.. serverside. Bye, B. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Validating forms
Hello, "Julio Cuz, Jr." wrote: Hi-- I have a form that cannot have a specific field blank, so I would like to add a message box saying "fill out the x field," is there a way to do this WITHOUT having to refresh the page? Maybe you would like to try this PHP form generation and validation class that does precisely what you want and more: http://phpclasses.UpperDesign.com/browse.html/package/1 Manuel Lemos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Validating forms
Julio, It is much more efficient to do that type of validation client-side, using Javascript. No sense in making another round trip to the server if not necessary. Here is a quicke example: if (document.autoform.txtVehicleNumber.value == ""){ document.autoform.txtVehicleNumber.focus() alert("Enter fleet vehicle number") return false } Have a look at http://www.wsabstract.com/ for good javascript info. good luck, Phil J. "Julio Cuz, Jr." wrote: Hi-- I have a form that cannot have a specific field blank, so I would like to add a message box saying "fill out the x field," is there a way to do this WITHOUT having to refresh the page? Julio Cuz, Jr. Riverside Community College [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]