0

私はRuby on Railsでremote_form_forを使用して、AJAXを介して情報を取得して現在のページに戻すポップアップフォームを作成しています。 FirefoxとChromeではすべて機能しますが、IE9では機能しません。 Rubyのコードは次のようになります。ChromeとFirefoxではリモートフォームが正しく完了しましたが、IEはありません

remote_form_for :quiz_questions, 
       :url => auto_populate_quiz_questions_path(), 
       :update => "quiz_questions", 
       :html => { :id => "auto_pop_questions_form" }, 
       :position => "after", 
       :complete => 'toggle_hidden("search_comp", false); update_existing_questions(); ' do |f| %> 

これは私には似ているが、IEでは動作しないHTMLとJavascriptコードを生成します。ここにHTMLとJavascriptがあります:

<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;"> 

私が知ることから、onCompleteはIE9で決して発射されません。なぜonCompleteはChromeとFirefoxでは正常に機能しますが、IE9では正常に機能しませんでしたか?

答えて

0

ここで問題となっていたのは、挿入にあったのは、パラメータ「挿入」があったときだけでした。修正はPrototypeをアップグレードすることでした。私はプロトタイプ1.6.0.1を使用していましたが、1.6.0.2への簡単なアップグレードは問題を修正しました。より大きなメジャーアップグレードはおそらくそれをうまく修正するでしょう。

関連する問題