Ok, so im hosting a website with a Xat.com´s chatbox on it... i know that those things are not secure chat at all cuz they can be accesed from the main Xat.com site... anyway, i need my webpage (which isnt much, jst a couple of imgs and the embed chat) to be protected against anybody that doesnt know the password for it.
I like to keep it simple because is not a big deal so i tryed a really siple javascript for the password:
- Code: Select all
<!--//
var x = prompt("Password","")
if(x == "the pass"){
alert("wellcome");}
else{
alert("WEB PAGE DOES NOT EXIST!");
window.location = "http://www.google.com"}
-->//
that script goes inside the header tags, the problem is that anyone could acces that site jst by disableing the javascript. im not trying to defend this site from hackers, i just want a nice method to keep not authorized normal people out of it...
im not sure if i explained my self





