Fancybox validation
Fancybox validation
Hey!
I'm using the JQuery validation plugin inside a Fancybox window.
My contact form appears in the modal popup when the user clicks a link
(loaded through an external .html file with the form code)
, but my problem is that the validation is always skipped and the form is always submitted.
The weirdest thing is it works if I put an "alert('...');" before the validation code 
The link:
...
<a id="open" href="../Myform.html">myform</a>
...
The Form (in the myform.html file):
...
<form method="POST" id="clickForm" action="../submit.php"><br>
...
The Form .js configuration file:
$(document).ready(function(){
$('#clickForm').validate({
rules:{...},
messages:{...},
submitHandler: function(){
form.submit();
... and some effects
});
As stated above, it works only if:
$(document).ready(function(){
alert('...');
$('#clickForm').validate({
rules:{...},
messages:{...},
submitHandler: function(){
form.submit();
... and some effects
});