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("search_comp", false);
update_existing_questions();
},
parameters:Form.serialize(this)
}
);
return false;">
의 onComplete를 결코 IE9에서 발사되지 않습니다 다음은 HTML과 자바 스크립트입니다. Chrome과 Firefox에서는 onComplete가 제대로 실행되지만 IE9에서는 제대로 실행되지 않습니다.