0

Ruby on Rails에서 remote_form_for를 사용하여 AJAX를 통해 정보를 가져 와서 현재 페이지로 반환하는 팝업 양식을 만듭니다. 모든 것은 파이어 폭스와 크롬에서는 훌륭하게 작동하지만 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| %> 

이 코드는 나에게 맞는 HTML과 Javascript 코드를 생성하지만 IE에서는 작동하지 않습니다. 내가 무엇을 말할 수에서

<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에서 발사되지 않습니다 다음은 HTML과 자바 스크립트입니다. Chrome과 Firefox에서는 onComplete가 제대로 실행되지만 IE9에서는 제대로 실행되지 않습니다.

답변

0

여기서 문제는 삽입과 관련된 문제였습니다. 매개 변수 "삽입"이있을 때만 문제가 발생했습니다. Prototype을 업그레이드하는 것이 수정되었습니다. 프로토 타입 1.6.0.1을 사용하고 1.6.0.2 로의 간단한 업그레이드가 문제를 해결했습니다. 더 중요한 업그레이드는 아마 잘 그것을 고칠 것입니다.

관련 문제