Html for this script
<!--Begin of password protection html-->
<html><body onLoad="password()">
<title>Login</title>
<script language="javascript">
<!--hide from old browsers
/*this script was made by JiMbO and can be modified in anyway as long as his URL and email address remain here:
email: J_M_S@bigfoot.com
homepage: http://jimbo132435.home.ml.org
this script was taken from www.javascripts.com*/
function password() {
var incorrect=' '
/*In between the ' ' on incorrect is where you type where you want them to go if they get the password incorrect*/
var goodjob='#html'
/*in between the ' ' you type where you want them to go if they get the password correct, example, membersonly.htm*/
var pw=prompt('Whats the magic word???')
if (pw=='thisscriptrules')
/*type the password you want in between the ' '*/
{
alert('Password correct')
location.href=goodjob
}
else {
if (pw=='') {
alert('Type something!!!!!')
password()
}
else {
alert('Incorrect password, no one cracks my passwords')
location.href=incorrect
}
}
}
/*you must modify this script to fit your needs*/
stop hiding-->
</script>
If nothing happened when this page loaded you dont have a javascript enabled browser and cant go to the password protected area, sorry
</body>
</html>
<!--End of script-->