php - How can I make window.location.replace work in IE 9? -


i've got following code checks username , password, , redirects new page if it's successful. works on firefox fine, when try on ie 9, sits , hangs. need make 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.");        } }, 

first in regard other answers: location.replace not same changing location.href, reacts history differently, , in many cases location.replace better user experience, lets not throw towel in on location.replace quite quickly!

so tested location.replace in ie9 on machine , worked.

then tested console.log on ie9 , choked (that apparently works if developer panel or tab or open i'm reading, though don't have experience ie9's dev tools sure).

i'm betting problem not location.replace function, in fact console.log function right before it!


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -