|
Answer» Hi
Ive created my own website with plublisher 2007 but now i need to password protect certain content on the website i need to create different passwords You could use a user login authentication SYSTEM using PHP or ASP etc., or you could use htaccess.ok but i created the site with ms publisher 2007 will those still work? Is your site built with ASP or plain HTML?Plain html i just desighned it with publisherTry here: http://www.javascriptkit.com/howto/htaccess3.shtmlMaybe try this? I think it doesnt work...
Code: [SELECT]<SCRIPT TYPE="text/javascript"> function askLogin(password) { var p = prompt('Please enter your password','Password') if p('',password') { alert('Thanks!') else alert('You do not have permission to access this page!') var newLoc = "http://www.example.com/path-to-failed-login.type" window.location = newLoc } }
<body onLoad="askLogin('PASSWORD HERE')">For multiple passwords, use:
Code: [Select]<script type="text/javascript"> function askLogin(password) { var p = prompt('Please enter your password','Password') if p('',password') { alert('Thanks!') else alert('You do not have permission to access this page!') var newLoc = "http://www.example.com/path-to-failed-login.type" window.location = newLoc } }
<body onLoad="askLogin('PASSWORD HERE','Password Here','Password Here','So on')">
|