【问题标题】:Ajax.Updater insertion not working in IEAjax.Updater 插入在 IE 中不起作用
【发布时间】:2012-01-09 18:19:05
【问题描述】:

我有以下代码是由 Ruby on Rails 函数调用自动创建的。它在 Firefox 和 Chrome 以及 IE8 中运行良好,但在 IE9 中不起作用。

<form 
 action="/cms/quiz_questions/auto_populate" 
 id="auto_pop_questions_form" 
 method="post" 
 onsubmit="new Ajax.Updater(
   'quiz_questions', 
   '/cms/quiz_questions/auto_populate', 
   {
     asynchronous:true, 
     evalScripts:true, 
     insertion:'after', 
     onComplete:function(request){
       toggle_hidden(&quot;search_comp&quot;, false);
       update_existing_questions(); 
     }, 
     parameters:Form.serialize(this)
   }
 ); 
 return false;">

如果我删除插入参数,那么它在 IE9 中可以正常工作,但是我的内容被替换而不是添加到。为什么这在 IE9 中不能正常工作?或者,或者,我怎样才能以不同的方式执行此 AJAX 调用以避免该问题?

【问题讨论】:

  • 也许可以尝试 insertion: Insertion.After 而不是 insertion:'after'。不推荐使用插入对象表示法,但由于 Internet Explorer 有点慢,它可能会起作用。值得一试。
  • 感谢您的想法。这可能有效,我不确定。但由于这是由 Ruby on Rails 自动创建的,所以它不是一个选项。原来我需要升级我的原型版本。不过,感谢您的尝试。

标签: javascript ajax prototypejs internet-explorer-9


【解决方案1】:

原来我需要升级我的原型版本。我正在运行 Prototype 1.6.0.1,只是升级到 1.6.0.2 解决了这个问题。进一步的升级可能也会奏效。

【讨论】:

    猜你喜欢
    • 2011-12-10
    • 2015-02-25
    • 2010-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多