Error Checking (user) - JavaScript Help


var password = "bambam"; function prtyo(){ prompt("Enter password"); if(prompt != password){ alert("Wrong password, please try again :)"); prompt("Enter password"); }else{ window.location = "ohai.php"; } } prtyo();
What's going on here is that I would like the user to enter a "password" to be redirected to a different page. But yet, It only checks it twice, even if it is wrong, it will still allow them to see the page, but won't redirect it.
Posted On: Wednesday 2nd of January 2013 12:40:24 AM Total Views:  274
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Scrolling textarea with JS in Safari

Hi all, I'm trying to keep the scrollbar positions of a textarea and a div in sync. Right now I'm doing that basically by settting div.scrollTop = textarea.scrollTop every 250 ms. This works fine in FF and IE, but not ...
VIEWS ON THIS POST

208

Posted on:

Friday 30th November 2012
View Replies!

Why doesn't this page work with Firefox?

******** begin *** Itech Consulting Services Limited