•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 374,571 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,576 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
A handy code that brings up a password window to keep others off of the web pages you choose.
Last edited : Apr 21st, 2007.
<script language="JavaScript"> var password; var pass1="PASSWORD-HERE"; password=prompt('Whats The Magic Word?',' '); if (password==pass1) alert('That Is Correct!'); else { window.location="SITE-LINK"; } </script>
Comments (Newest First)
Mohan0704 | Newbie Poster | May 20th, 2008
•
•
•
•
sorry for the last post, my browser was laggy/not responding
Mohan0704 | Newbie Poster | May 20th, 2008
•
•
•
•
You can make a new .js/.jse file and make variables containing the password. Still, you can get into it. Try to make it as secure as you can. But it wouldn't be worth it for just 1 web page...
Mohan0704 | Newbie Poster | May 20th, 2008
•
•
•
•
You can make a new .js/.jse file and make variables containing the password. Still, you can get into it. Try to make it as secure as you can. But it wouldn't be worth it for just 1 web page...
Randy Epperson | Newbie Poster | Dec 2nd, 2007
•
•
•
•
I'm really new to Javascript so please pardon this naive question - if the value of the password is posted in line 3 and anyone can view the source of a page, how is the password protected?
Thanks
Thanks
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)