When I used document.location.reload() as in case1 below, it doesn't work. But when I add an alert() as in case2, it works. I want to figure out what happened?
//case1: does not work document.location='rc_msg.php?remove=0'; document.location.reload(); //case2: work document.location='rc_msg.php?remove=0'; document.location.reload(); alert("OK!!"); I did not notice I entered '=' twice, I am sorry about that. I had tried the opinion solution below, but they did not work neither
document.locationis an object, you're trying to compare it to a string...