View Full Version : Password Protect
basically i need a javascript password protection area. All i want is a pasword box which will, when the correct password is inputed, redirect to another page.
Before you all go on i know its a rubbish way of protecting somthing but it's just for a harmless bit of fun!
Thanks.
splintercell!
22-02-2005, 09:39 PM
This is nice and easy just change the user name a password and is pretty effective!
<script language="JavaScript">
<!--
var username = prompt("Enter Username In the Box Below","")
var password = prompt("Enter Password In the Box Below","")
if (username !="<!--Username HERE-->" || password !="<!--Password Here-->")
{ top.location="about:Bad Username and/or Password" }
//-->
</script>
thanks, thats i big help...i think lemmi test it out!
[EDIT] - I need it so that it's only a text box...
Homesrfan
23-02-2005, 12:41 AM
You can get one at Bravenet!
Mentor
23-02-2005, 01:26 AM
thanks, thats i big help...i think lemmi test it out!
[EDIT] - I need it so that it's only a text box...
text box on the page?
heres on of htmlgoodies
http://www.htmlgoodies.com/JSBook/pw33.html
(i think u have to login to get the script )
Homesrfan
23-02-2005, 04:22 AM
Good job mentor!
*applause*
thanks, i will try and adapts that one but what i need is JUST a password box so as people can type an answer to a question in it.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.