Here is the script: I would be really happy if somebody could help me.
-----------------------------------------------------------------------
<!-- STEP ONE: Add code to HEAD of login HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function LogIn(){
loggedin=false;
username="";
password="";
username=prompt("Username:","");
username=username.toLowerCase();
password=prompt("Password:","");
password=password.toLowerCase();
if (username=="guest" && password=="login") {
loggedin=true;
window.location="home-page.html";
}
if (username=="guest2" && password=="login2") {
loggedin=true;
window.location="home-page2.html";
}
if (loggedin==false) {
alert("Invalid login!");
}
}
// End -->
</SCRIPT>
<!-- STEP TWO: Put this code in BODY of your HTML document -->
Well, the script works perfect but the password protected webpage opens in a new window.
"username=prompt("Username:","");
username=username.toLowerCase();
password=prompt("Password:","");
password=password.toLowerCase();
if (username=="guest" && password=="login") {
loggedin=true;
window.location="home-page.html"; <<< Here I would like it to open in my
within my frame.
What do you mean with id? www.incustos.se is the site. To the right you have "Logga in", there is the script but it opens in a new window and I want it in the frame.
When you click on the "Logga in" -button you are asked by promt and that is correct. But try to write admin as "användarnamn" and "admin as "lösenord when you select the "Logga in" -button. The result is that you are taken to correct page BUT in a new window instead of inside the parentframe!
I'm using Google Chrome and the page loads in the frame but the page is missing. Also the page loads sooooooo slowly. Is there a way to speed everything up on your side?
Code:
This webpage is not available
The webpage at http://www.incustos.se/frame.htm might be temporarily down or it may have moved permanently to a new web address.
Here are some suggestions:
Reload this web page later.
Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.
Bookmarks