Update:
I just found out that above piece of code works, what doesn't work is what follows in the "other stuff" part, which I have this:
javascript Code:
var loginAjax = new Ajax.Request('/foobar/url', {
method: 'post',
parameters: {user: $('username').value},
onSuccess: function(transport) {
$('errorMsg').innerHTML = transport.responseText;
},
onFailure: function() {
$('errorMsg').innerHTML = 'Failed.';
},
});
In FireFox, it would work fine and the errorMsg would update accordingly.
However, in IE, it just redirects to the /foobar/url page, as if AJAX is not used at all and the form just got submitted..