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| %>
這將產生HTML和Javascript代碼,看起來我的權利,但在IE無法正常工作。這裏是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("search_comp", false);
update_existing_questions();
},
parameters:Form.serialize(this)
}
);
return false;">
從我可以告訴,onComplete永遠不會在IE9射擊。爲什麼onComplete會在Chrome和Firefox中正常啓動,但不會在IE9中啓動?