Rockonmetal
05-09-2007, 05:23 PM
I found this script off of someother site... here it is:
function had(){
loggedin=false;
username="";
password="";
username=prompt("Username:","");
username=username.toLowerCase();
password=prompt("Password:","");
password=password.toLowerCase();
if (username=="1" && password=="1") {
loggedin=true;
window.location="home.html";
}
if (username=="Username" && password=="Password") {
loggedin=true;
window.location="home.html";
}
if (loggedin==false) {
alert("Hi");
}
}
this is js file. I want the alerts and window.locations to change to document.writes. cuz I want it to say... "Correct" or "Incorrect"... I DON'T WANT TO CHANGE PAGES!
thanks all
function had(){
loggedin=false;
username="";
password="";
username=prompt("Username:","");
username=username.toLowerCase();
password=prompt("Password:","");
password=password.toLowerCase();
if (username=="1" && password=="1") {
loggedin=true;
window.location="home.html";
}
if (username=="Username" && password=="Password") {
loggedin=true;
window.location="home.html";
}
if (loggedin==false) {
alert("Hi");
}
}
this is js file. I want the alerts and window.locations to change to document.writes. cuz I want it to say... "Correct" or "Incorrect"... I DON'T WANT TO CHANGE PAGES!
thanks all