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