Board Logo

errors in validator settings structure?
woodyrnr - 5/5/2009 at 05:04 PM

I thought I was good at this ...
My order form fails to return an error with invalid or missing-and-required entries. Several times I made same mistake as "viet," had a comma after the last element in fields string, but that's not the problem here (I hope). Finally ripped all but one of the form fields out of the form, now the fields string has just one element, still won't validate.
I know I'm going to groan when someone points out my mistake ...
<form action="PointForm_beta.html" method="get" name="goodForm" onSubmit="return v.exec()">
<table width="672" border="1" cellpadding="3" cellspacing="2" bordercolor="#FFFFFF" id="Sub Table 1">
<td id="t_nameOnCard"><div align="right"><strong>Name as it appears on card:</strong></div>
<td><input name="nameOnCard" type="text" id="nameOnCard" size="50" maxlength="50" />
<td><div align="right"><span class="style10"><strong>Click Submit:</strong></span></div>
<td><label for="Submit"></label><input name="Submit" type="submit" value="Submit"/>
<input name="Clear " type="reset" id="Reset" value="Clear " />
<script language="javascript">
// form fields description structure
var a_fields = {
'nameOnCard' : {'l':'Name On Card','r':true,'f':'alpha','t':'t_nameOnCard','mn':'5','mx':'50'}
o_config = {
'to_disable' : ['Submit'],
'alert' : 1
// validator constructor call
var v = new validator('goodForm', a_fields, o_config);

Any ideas?
Thanks, and best regards

Back to forum: