[thelist] javascript: Form validation error?
AtdtXav
atdtxav at yahoo.com
Thu Jun 6 14:41:12 CDT 2002
What's wrong with this picture? I can't change any form
variable names, which complicates things. When testing this
locally, it never validates, just errors because it can't find
the servlet.
Help?
Thanks :)
Scott
<head>
function checkform ( form )
{
// 1
if (form.region.value == "") {
alert( "Please enter the region" );
form.region.focus();
return false ;
}
// 2
if (form.location.value == "") {
alert( "Please enter the location." );
form.location.focus();
return false ;
}
// etc
}
</head>
<body>
<FORM enctype="multipart/form-data" name="fform"
action="/servlet/UploadProcess" method="post" onsubmit="return
checkform(this);">
// details of form
<input type="image" name="SubmitUpload" src="/images/submit.gif"
hspace="0" vspace="0" border="0" onClick='submit();'>
</body>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
More information about the thelist
mailing list