|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Not stopping on submit
Morning,
I have a function below, that works to check things but instead of going back to the field to fix it's going to submit instead. Any thoughts you have would be appreciated. Thanks Laura <SCRIPT LANGUAGE="JavaScript"> function verify() { var count=0; var msg=""; for(i=0;i<=4;i++) { if(document.DataEntry.elements[i].value=="") { count=1; msg=msg+"n"+document.DataEntry.elements[i].name; } else if((i>3) && (count==0)) { return true; } } for(i=0;i<=4;i++) { if(document.DataEntry.elements[i].value=="") { alert("PLEASE FILL IN THE FOLLOWING FIELD(S)n "+msg); document.DataEntry.elements[i].focus(); return false; } } } //--> </script> |
|
#2
|
|||
|
|||
|
RE: Not stopping on submit
how do you call this function?
onSubmit="return verify();" should work. |
|
#3
|
|||
|
|||
|
RE: Not stopping on submit
Yup thats what I have.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Not stopping on submit |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|