Forum Moderators: open
Sorry, this is the full age script:
<script language="javascript">
var agePrompt=prompt("You must be over 18 to enter.")
if (agePrompt>=18) alert('welcome to ....')
else {
alert('Sorry, we can not let you in!')
document.location="http://www.example.co.uk";
}
</script>
Basically the script is put on the index page of the site. Then it pops up a few alerts. How do i get it to miss the "welcome" alert, and just go straight into the site?
regards
webboy
(edited by: tedster at 6:47 pm (utc) on May 2, 2002)
<script language="javascript" type="text/javascript">
var agePrompt = window.prompt("You must be over 18 to enter. Please enter your age:","")
//If value entered is Not a Number or less than 18 then reject.
if (isNaN(agePrompt) ¦¦ agePrompt<18)
{
alert('Sorry, we can not let you in!')
document.location="http://www.example.co.uk";
}
</script>
Josh
(edited by: tedster at 6:47 pm (utc) on May 2, 2002)