json - jQuery AjaxSubmit 在 IE9 上未触发

标签 json jquery post internet-explorer-9

我正在提交正常的 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

} });

有什么想法吗?谢谢!

最佳答案

兼容模式是打开还是关闭?

您是否尝试过通过以下方式设置 IE8 标准:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

关于json - jQuery AjaxSubmit 在 IE9 上未触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9526556/

相关文章:

javascript - 在 fancybox 2 的弹出窗口中显示上一张和下一张图像

php - 如何将表单数组值插入 MySQL?

android - 使用 robospice google http 客户端在 Post 中发送 JSON

javascript - XML 到 JSON 代理服务器未获取 XML 源

javascript - 无法在 JSON-SERVER 中获取对象关键数据

ajax - Rails 3 + UJS 使用 Ajax 进行远程调用并渲染生成的 JSON 对象的简单示例

javascript - 在上一个补间完成后启动补间。 - Greensock/ScrollMagic

jquery - 单击在 Selenium 和 nightwatch 中不起作用

post - ColdFusion CFHTTP Post到远程表单不返回结果页面,它只返回输入表单

java - 如何将包含内容的 TreeMap 转换为 JSON 格式 Spring REST Controller JAVA