hello
i hav a little problem this is a script calles secret word when you type the
secret word you get a alert whit the text:"and this is the text of the alert
wehn you know the word"
butt i want not a alert but a forwarding to a other site can anybody help
me ?
and sorry my english is NOT good
thnx sander
<html>
<head>
<title>secret word</title>
<script language="JavaS cript">
var nav=navigator.a ppName;
var ns=(nav.indexOf ("Netscape") !=-1);
if(ns){
if(document.lay ers){
document.captur eEvents(Event.K EYPRESS);
document.onkeyp ress = cheat;
}
if(document.get ElementById){
document.onkeyp ress = cheat;
}
}
else
{document.onkey press = cheat;}
var SpecialWord = "secret";//thist is the secret word
var SpecialLetter = 0;
var vcheat = false
function cheat(keyStroke )
{
var eventChooser = (ns)?keyStroke. which: event.keyCode;
var which = String.fromChar Code(eventChoos er).toLowerCase ();
if(which == SpecialWord.cha rAt(SpecialLett er)){
SpecialLetter++ ;
if (SpecialLetter == SpecialWord.len gth) alert("and this is the text of
the alert when you know the word")
}
else {SpecialLetter = 0;vcheat = false}
}
</script>
</head>
<body>
</body>
</html>
i hav a little problem this is a script calles secret word when you type the
secret word you get a alert whit the text:"and this is the text of the alert
wehn you know the word"
butt i want not a alert but a forwarding to a other site can anybody help
me ?
and sorry my english is NOT good
thnx sander
<html>
<head>
<title>secret word</title>
<script language="JavaS cript">
var nav=navigator.a ppName;
var ns=(nav.indexOf ("Netscape") !=-1);
if(ns){
if(document.lay ers){
document.captur eEvents(Event.K EYPRESS);
document.onkeyp ress = cheat;
}
if(document.get ElementById){
document.onkeyp ress = cheat;
}
}
else
{document.onkey press = cheat;}
var SpecialWord = "secret";//thist is the secret word
var SpecialLetter = 0;
var vcheat = false
function cheat(keyStroke )
{
var eventChooser = (ns)?keyStroke. which: event.keyCode;
var which = String.fromChar Code(eventChoos er).toLowerCase ();
if(which == SpecialWord.cha rAt(SpecialLett er)){
SpecialLetter++ ;
if (SpecialLetter == SpecialWord.len gth) alert("and this is the text of
the alert when you know the word")
}
else {SpecialLetter = 0;vcheat = false}
}
</script>
</head>
<body>
</body>
</html>
Comment