【问题标题】:Internet explorer wont show the rendered gsp with embeded jqueryInternet Explorer 不会显示带有嵌入 jquery 的渲染 jsp
【发布时间】:2011-08-24 14:21:50
【问题描述】:

我发送一个 Ajax 请求,结果是一个使用 data-table jquery 插件呈现的表。如果响应成功,我将打开一个新窗口并在那里显示结果。这在 FF 中完美运行,但在 IE 8 中失败。IE 抛出对象预期错误。由于某种原因,它无法识别 jquery 库。但是,如果我刷新 IE 页面一次,它将成功呈现表格。 我在这里错过了什么吗?在 IE 中打开新窗口有什么不同?

    function   openResult (html){
        var output =  window.open("",null, "resizable=1,scrollbars=1,status=1,toolbar=0,menubar=0,location=0");
         if (window.focus) {output.focus()}
         output.document.open();    
         output.document.write(html);
         output.document.close();    

   return false;
   };

.....

 $.ajax({
           type: "POST",
           url: "${g.createLink(action: 'search' )}?&time="+ date,
           data: dataString,  
           success: function(response) {
               $("#displayBox").hide()
               openResult(response)
               //$('#listTemplateDivId').html(response) ;              
               $.unblockUI()

           }
 });

【问题讨论】:

  • 弹出窗口很烦人。请考虑使用内联的东西,例如jQuery UI 对话框。

标签: javascript jquery internet-explorer grails internet-explorer-8


【解决方案1】:

@ThiefMaster 感谢您的建议。我最终使用了 colorbox 并且它工作得很好。

【讨论】:

    猜你喜欢
    • 2017-01-30
    • 1970-01-01
    • 2011-10-29
    • 1970-01-01
    • 1970-01-01
    • 2012-09-10
    • 1970-01-01
    • 2011-02-11
    • 2019-08-27
    相关资源
    最近更新 更多