Hi Everyone!
I have a form which needs to be validates and then submitted with ajaxForm (the form contains image and file data, so submission with .serialize() won't
work). The following are the details:
HTML:
<form id="myForm" action="..." method="post" enctype="multipart/form-data">
...
<input type="file" name="image" /><br />
<input type="file" name="file" /><br />
...
</form>
jQuery:
$(document).ready(function() {
$("#myForm").ajaxForm ({
beforeSubmit: function() {
$("#myForm").validate({
onkeyup:false,
rules: {
...
},
messages: {
...
},
});
},
success: function(returnData) {
$('#content').html(returnData);
}
});
});
Thanks in advance.
AVADHESH PATEL
11-Mar-2013