|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
Form Validation
I'm using the following to validate that an entry has been made before sending form values using mailto. However, this sends the email whether the data is valid or not. This function is called form the onClick event of the Submit button - I must need to replace the 1st 'return' with another command?
Any thoughts? thanks function validateIt() { var txtText txtText = document.request.company.value; if(txtText.length < 1) / { alert("Must enter a value"); txtText.focus; return; } /* input ok */ return; } |
|
#2
|
||||
|
||||
|
Isn't it a javascript (or ECMASCRIPT)? If this is the case, post it to the appropriate forum, and notice that data validation is better done on server side!
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Form Validation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|