Я отправляю обычный запрос aJaxSubmit. Отлично работает на FireFox и Chrome.
Однако на IE9 это не работает. Он идет только до «beforeSubmit» и успешно завершает предварительную передачу, затем ничего не делает.
Инструменты разработчика IE9 не показывают сообщения для process.php
Вот мой код:
$("#mainForm").validate({
rules: {
// This looks for the html artibute name="CaseSensitiveNameHere"
// Also the inital element being validated is case sensitive to whatever the html arrtibute is. So if it is name="EMAIL", then you must set the function below to EMAIL: { function } required: 'EMAIL'.
name: {
required: "name", // this means that the "name:" field must return the value == the "Name" function above - also it must have the same name as itself - so Name must have a function called Name
required: true // this makes "null" or emtpy invalid
},
email: {
required: 'email', //this means that the "Email:" field must return the value == the "Email" function above - also it must have the same name as itself - so Email must have a function called Email
required: true,
email: true // this makes "null" or emtpy invalid
},
webinarDate: {
required: true
},
webinar_date: {
required: true
},
webinar_time: {
required: true
}
}, // End Rules
messages: {
Name: "Enter Your First Name",
Email: "Enter A Valid Email",
webinarDate: "Choose A Webinar Time"
},
onfocusout: false,
//errorElement: "div",
errorPlacement: function(error, element) {
element.parent("td").prev("td").html(''); // Clears placeholder text in previous <td> element
//$(".errorBox").html(''); //Clears the text in #errorBox1 for error text to be placed there
error.appendTo( element.parent("td").prev("td") ) // places error text in previous sibling <td> element! woo yes! haha 2/4/11
//error.appendTo(".errorBox") // places error text in #errorBox1
.css('font-weight', 'bold'); // sets css for - error.appendTo so its error.appendTo.css
// other Error based scripts here!
},
success: function(label) {
label.addClass("valid").text("").removeClass("error");
},
submitHandler: function(form) {
jQuery(form).ajaxSubmit({
type: "post", // sets the method to POST (default is GET) if no "method" attribute is found on the <form> tag!!!
url: "process-autopilot.php",
crossDomain: true,
dataType: "json",
beforeSubmit: showRequest(), // run the BEFORE SUBMITTING CALLBACK aka Function - check if email is set to example@gmail.com, if true, return false, else, return true and go head and submit!
success: function(data, textStatus){ //do stuff
} });
Есть идеи? Спасибо!