Board Logo

TFV not working on this one form but everywhere else is fine.
clubbing80s - 4/26/2007 at 12:40 PM

Hi
I have on form that I cant get TFV to work on, the submit button just acts as it TFV doen't exist. Mybe a second pair of eyes will see what I have missed..



<snip>
<script language="JavaScript" src="../include/validator.js"></script>
<style>
.tfvHighlight {color: red;}
.tfvNormal {color: black;}
.inputHighlighted {color: red;}
.inputNormal {color: black;}
</style>
</snip>
<snip>
<form action="<?=$PHP_SELF?>" method="post" onsubmit="return v.exec()" name="recpass">
</snip>
<snip>
<input type='hidden' name="wizzard" value="getstnr" />
<tr><td width='25%'>&nbsp</td><td id="id_stnr" align="right">Student Nr</td><td><input type="text" name="stnr" /></td><td width='25%'>&nbsp</td></tr>
<tr><td>&nbsp</td><td>&nbsp</td><td><input type="submit" name="Submit" value="Next>>" /></td></tr>
</table>
</form>
<?php
print "
<script>
debug,
var a_fields = {
'stnr' : {'l' :'Student', 'r': true, 'f' :'integer', 't' :'id_stnr'}
},
o_config = {
//'to_disable' : ['Submit'], 'alert' : 1
}
var v = new validator('recpass', a_fields, o_config);
</script>";
?>
</snip>


tigra - 4/26/2007 at 02:37 PM

replace
o_config = {
//'to_disable' : ['Submit'], 'alert' : 1
}
with
o_config = {
'to_disable' : ['Submit'],
'alert' : 1 + 4
}

this will also enable the debug messages


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/