need some new eyes.
Posted: Thu Oct 25, 2007 4:09 pm
Ok, I'm trying to learn some Javascript and im messing with this and I can figure it, anybody care to help? it just displays a blank page with nothing.
Thanks in advance,
bryan
Code: Select all
function get_name()
{
var name1=prompt("Please enter name")
var age=prompt("Please enter your age")
if(age <21)
{
alert("sorry "+name1+", you're only "+age+", Here's a site just for you.")
window.location("http://www.msn.com")
}
else{
alert("Hello "+name1+", Since you're "+age+", you may view this site.")
}
}
Thanks in advance,
bryan