Hi, i'm using the JQuery validator plugin from this site:
Works excellent so far, except in IE7... It just doesn't do any checks, and when i press on a button it doesn't respond to it either... Anyone else encountered problems in IE7 ? Or is it just that my code isn't good?
This is what i have for a login:
-
var v = $("#login").validate({
errorClass: "warning",
rules: {
email: {
required: true,
email: true
},
password: {
required: true,
minlength: 5
}
},
messages: {
email: {
required: "U heeft nog geen email adres opgegeven",
email: "Ongeldig email adres"
},
password: {
required: "Geef aub een wachtwoord op",
minlength: "Uw wachtwoord moet minimaal uit 5 characters bestaan"
}
},
submitHandler: function() {
document.forms[0].submit();
}
});
And this is the html that i have: (and i think the import things to notice in this html code is the <form> tag and that the submit button is a <button></button> instead of a <input type="submit".... /> )
-
<form name="login" id="login" method="post" action="">
<fieldset>
<legend>Inloggen</legend>
<p>U kunt hier inloggen met uw account.<br />
Heeft u nog geen account? Klik dan <a href="<?= $_baseurl; ?>registreren/">hier</a> om u te registreren!</p>
<ol>
<li>
<label class="form_label" for="email"><strong>Email adres:</strong></label>
<input type="text" id="email" name="email" style="width:200px;" />
</li>
<li>
<label class="form_label" for="password"><strong>Wachtwoord:</strong></label>
<input type="password" id="password" name="password" style="width:200px;" />
</li>
</ol>
<br />
<div style="text-align:center;"><button name="inloggen" value="inloggen" class="button-primary">Inloggen</button></div>
<br />
<br />
</fieldset>
</form>
Anyone any idea how to make it work in IE7...??