I am trying to do a check on a random number that was generated and the number the user enters. If they don’t match I want the page to reload and generate a new random number, but keep the information the user typed in the other fields. It works in firefox, but not in IE.
Here is the function that does the checking.
[code=php]
function check()
{
//random number that is stored
var ran1 = document.form1.hiddenfield.value;
//number the user enters to match hiddenfield
var ran2 = document.form1.mrRandom.value;
//field that needs to be kept when page is reloaded
var ran3 = document.form1.box.value;
if(ran1 != ran2)
{
message = “Numbers don’t match”;
alert(message);
location.reload();
document.form1.mrRandom.value = “”;
document.form1.box.value = ran3;
return false;
}
return true;
}