No Choice Refresh

liunx

Guest
I'm using Javascript in a web page. The user enters a selection from a list, and it is suppose to be within a set range of values. Depending on what they enter, different values get assigned to several different variables. I'm trying to set up what will happen if the selection is not on the list. What I had in mind was that the page would just automatically reload. All the code snippets I can find anywhere all deal with buttons and timers, but I want it to do it automatically after a messagebox tells them what they're doing wrong.<br /><br />For example, if they were to enter a number between 1 and 8, and I was thinking this:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><br />if (number < 1)<br />  {<br />      window.alert("Please enter a number between 1 and 8.");<br /> }<br /><!--c2--></div><!--ec2--><br />When they click the OK button of the alert, I'd like the page to reload. Ideas?
</div>
 
Top