I've got the following code that checks for a username and password, and then redirects to a new page if it's successful. It works on Firefox just fine, but when I try it on IE 9, it just sits and hangs. What do I need to do to make this work on IE?
username=$("#user_name").val();
password=$("#password").val();
$.ajax({
type: "POST",
url: "login.php",
data: "name="+username+"&pwd="+password,
success: function(html){
console.log(html);
if(html=='true') {
window.location.replace("newpage.php");
} else {
$("#add_err").html("Wrong username or password.");
}
},