Your function has no return value. Some browsers will override the default action even with no return value. Technically this is incorrect. So Opera is actually doing it 'right' here. Just add a return false:
Code:
. . . nerHTML = 'Attempting to log in...';
xmlhttp.open('GET','xmlfile.txt',true);
xmlhttp.send(null);
}
else {
window.o.innerHTML = window.c;
}
return false;
}
And be sure to add the event like so:
Code:
<form name="logger" method="post" action="" onsubmit="return login();">
Alternatively, you may add the return value to the event attribute:
Code:
<form name="logger" method="post" action="" onsubmit="login(); return false;">
Note: Your onreadystatechange function does have a return value of false when successful. However, the onreadystatechange function is not the onsubmit event of the form and has no influence over the return value of the login function.
Bookmarks