Code like this :
<form>
<ol>
<li>
<fieldset>
<legend>test</legend>
<ol>
<li>
<label for="qwerty">qwerty</label>
<span id="sprytextfield1">
<input name="qwerty" type="text" id="qwerty" />
<span class="textfieldRequiredMsg">error no qwerty input</span></span> </li>
</ol>
</fieldset>
</li>
</ol>
<p style="text-align:right;">
<input type="reset" value="reset" />
<input type="submit" value="submit" />
</p>
</form>
<script type="text/javascript">
$('form').submit(function() {
alert($(this).serialize());
return false;
});
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
//-->
</script>
I want to do. when i click the submit button serialize the form but when no error with spyr. if the spyr validation text error appears don t serialize or alert.
i think.i must make a if condition before alert.