...

View Full Version : Need help with form validating



thomasjojo
09-05-2008, 02:34 PM
I use this frmvalidator, together with a php script that insert my form results in a xls file,

i need to have the checkbox validated, it have to be checked to submit the form.. But im stuck, how do I set the codes..
:


<script language="JavaScript" type="text/javascript">
var frmvalidator = new Validator("nettskjema");


frmvalidator.addValidation("a","req");
frmvalidator.addValidation("a","maxlen=100");
frmvalidator.addValidation("a","a");

frmvalidator.addValidation("b","req");
frmvalidator.addValidation("b","maxlen=100");
frmvalidator.addValidation("b","b");

frmvalidator.addValidation("c","req");
frmvalidator.addValidation("c","maxlen=100");
frmvalidator.addValidation("c","c");



frmvalidator.addValidation("ACCEPT","req");
frmvalidator.addValidation("ACCEPT","shouldselchk");
frmvalidator.addValidation("ACCEPT","ACCEPT");

</script>

http://www.javascript-coder.com/html-form/javascript-form-validation.phtml



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum