[jQuery] Error with Ajax Submit with Form plugin in IE
Hi all,
In my web application, the user is able to fill in a contact form, which
will send an e-mail on submit.
I am using the official Form plugin.
The form plugin is working perfectly in Mozilla, but not in IE6.
Check the foillowing example :
http://matthew16.free.fr/temp/contact-form.php
When I submit the form in Mozilla, the content div is replaced by the string
returned by the php code.
in IE6, a new page is opened, like the ajax is not working.
I also noticed in IE6 that my javascript generates an error.
Thank you for any help !
$(document).ready(function(){
var options = {
target: '#contentwide', // target element(s) to be updated
with server response
beforeSubmit: showRequest, // pre-submit callback
success: showResponse // post-submit callback
};
$("#form_contact").validate({
submitHandler: function(form) {
$(form).ajaxSubmit(options);
},
event: "blur",
rules: {
lastname: "required",
address: "required",
city: "required",
phone: "required",
email: {
required: true,
email: true
},
emailbis: {
required: true,
email: true,
equalTo: "#email"
}
},
messages: {
lastname: {
required: "
Indiquez votre nom de famille."
},
address: {
required: "
Indiquez votre adresse."
},
city: {
required: "
Indiquez votre ville."
},
phone: {
required: "
Indiquez votre numéro de téléphone."
},
email: {
required: "
Indiquez votre e-mail.",
email: "
Indiquez une e-mail valide."
},
emailbis: {
required: "
Confirmer votre e-mail.",
email: "
Indiquez une e-mail valide.",
equalTo: "
Entrez le même e-mail."
}
}
});
});
// pre-submit callback
function showRequest(formData, jqForm, options) {
var queryString = $.param(formData);
return true;
}
// post-submit callback
function showResponse(responseText, statusText) {
}
--
View this message in context: http://www.nabble.com/Error-with-Ajax-Submit-with-Form-plugin-in-IE-tf4328848s15494.html#a12328680
Sent from the JQuery mailing list archive at Nabble.com.