Sylvain Perezsy
2006-Dec-06 12:45 UTC
onsubmit() with form_remote works with Firefox not with IE
Hello, In order to post both a "normal" form and a remote form, I use the following js function : function submitForm(form_name, url) { var f = document.forms[form_name]; if (url != '''') { f.action = url; } try { f.onsubmit(); } catch (e) { f.submit(); } } This function works fine with Firefox, but with IE it does not work well with remote forms. I mean the Ajax request goes to the server, the controller executes correctly the action and respond back to the client. But instead of having a part of the page updated, IE pops up a dialog box asking me to save a file that have the name of the action I called. In this file there is the usual RJS code (try { Element.update...) which is correctly interpreted by Firefox, but not by IE. This is why I thought the problem was coming from the way I submit the form. Any help will be highly appreciate. Cheers Sylvain Perez -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---