The form:
<form name="htmlform" action="index.html" method="post"/>
<input type="text" id="companyname" name="companyname"/>
<span id='htmlform_companyname_errorloc' class='error'></span>
<input type="contact" id="contactperson" name="contactperson"/>
<span id='htmlform_contactperson_errorloc' class='error'></span>
<input type="submit" value="Submit"/>
</form>
Validation:
<script type='text/javascript'>
// <![CDATA[
var frmvalidator= new Validator("htmlform");
frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("companyname","req","Please provide company name");
frmvalidator.addValidation("contactperson","req","Who is the contact person?");
// ]]>
</script>
How can I get a pop window if the form submitted successfully?
Aucun commentaire:
Enregistrer un commentaire