Help... I have a website made with Microsoft Frontpage 2003. I want to password protect 1 page. I created a button on the home page that is linked directly to the page I want to protect and it redirects me to the login page.
Here is the code from the protected page.
<html>
<head><script type="text/javascript">
<!--
if (parent.frames.length==0)
window.location.replace("http://home.twcny.rr.com/jparker/login.htm")
//-->
</script>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<script language="JavaScript">
<!--
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
</head>
<body onload="FP_preloadImgs(/*url*/'button3.jpg', /*url*/'button2.jpg', /*url*/'button15.jpg', /*url*/'button16.jpg')">
<p>This is page 2</p>
<p> </p>
<p> </p>
<p><a href="http://home.twcny.rr.com/jparker">
<img border="0" id="img1" src="button1.jpg" height="20" width="100" alt="home" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button2.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button1.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button3.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button2.jpg')" fp-style="fp-btn: Border Bottom 1; fp-orig: 0" fp-title="home"></a><a href="http://home.twcny.rr.com/jparker/login.hym"><img border="0" id="img2" src="button14.jpg" height="20" width="100" alt="page 2" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'button15.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'button14.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'button16.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'button15.jpg')" fp-style="fp-btn: Border Bottom 1" fp-title="page 2"></a></p>
<p> </p>
</body>
</html>
Then I created a login.htm page and with password protect I generated the code for the id & pass word and placed it in like this.
This is the login.htm page with template code from coffeecup......
<HTML>
<HEAD>
<TITLE>password.swf</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" link="#0000FF" vlink="#FFFF00">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0"
ID=password WIDTH=120 HEIGHT=104>
<PARAM NAME=movie VALUE="password.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=loop VALUE=false>
<PARAM NAME=wmode VALUE=false>
<EMBED src="password.swf" loop=false quality=high
WIDTH=120 HEIGHT=104 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</DIV>
</BODY>
</HTML>
Then I created a password.htm page and placed the frames code I see on the forum. And that page code looks like this...
<html>
<head><frameset rows="*,100%" border=0>
<frame name=hidden src=hidden.html marginwidth=0 marginheight=0 scrolling=no frameborder=0>
<frame name=visible src=password.html marginwidth=0 marginheight=0 scrolling=auto frameborder=0>
</frameset>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>password</title>
</head>
<body>
</body>
</html>
I also created a blank page call hidden.htm which I did nothing with.
Now I go to the home page and it works. I click on the button to go to the protected page and the login page comes up. I type in the logins and it seems to accept it be gets redirected back to the login page. I beleive the frames are wrong but for 5 hours now I can't figure it out. This is a test site for this.
The id and PW is test... the site is http://home.twcny.rr.com/jparker
Please help... Thank you for your time..
Here is the code from the protected page.
<html>
<head><script type="text/javascript">
<!--
if (parent.frames.length==0)
window.location.replace("http://home.twcny.rr.com/jparker/login.htm")
//-->
</script>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<script language="JavaScript">
<!--
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
</head>
<body onload="FP_preloadImgs(/*url*/'button3.jpg', /*url*/'button2.jpg', /*url*/'button15.jpg', /*url*/'button16.jpg')">
<p>This is page 2</p>
<p> </p>
<p> </p>
<p><a href="http://home.twcny.rr.com/jparker">
<img border="0" id="img1" src="button1.jpg" height="20" width="100" alt="home" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button2.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button1.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button3.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button2.jpg')" fp-style="fp-btn: Border Bottom 1; fp-orig: 0" fp-title="home"></a><a href="http://home.twcny.rr.com/jparker/login.hym"><img border="0" id="img2" src="button14.jpg" height="20" width="100" alt="page 2" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'button15.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'button14.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'button16.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'button15.jpg')" fp-style="fp-btn: Border Bottom 1" fp-title="page 2"></a></p>
<p> </p>
</body>
</html>
Then I created a login.htm page and with password protect I generated the code for the id & pass word and placed it in like this.
This is the login.htm page with template code from coffeecup......
<HTML>
<HEAD>
<TITLE>password.swf</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" link="#0000FF" vlink="#FFFF00">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0"
ID=password WIDTH=120 HEIGHT=104>
<PARAM NAME=movie VALUE="password.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=loop VALUE=false>
<PARAM NAME=wmode VALUE=false>
<EMBED src="password.swf" loop=false quality=high
WIDTH=120 HEIGHT=104 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</DIV>
</BODY>
</HTML>
Then I created a password.htm page and placed the frames code I see on the forum. And that page code looks like this...
<html>
<head><frameset rows="*,100%" border=0>
<frame name=hidden src=hidden.html marginwidth=0 marginheight=0 scrolling=no frameborder=0>
<frame name=visible src=password.html marginwidth=0 marginheight=0 scrolling=auto frameborder=0>
</frameset>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>password</title>
</head>
<body>
</body>
</html>
I also created a blank page call hidden.htm which I did nothing with.
Now I go to the home page and it works. I click on the button to go to the protected page and the login page comes up. I type in the logins and it seems to accept it be gets redirected back to the login page. I beleive the frames are wrong but for 5 hours now I can't figure it out. This is a test site for this.
The id and PW is test... the site is http://home.twcny.rr.com/jparker
Please help... Thank you for your time..
the login page needs to be in a frame. So, in your main page, the "page 2" link should open the html file that loads the frames and have "login.htm" load in the 100% frame. Hope that made sense.
Another way to edit your current setup would be to put the frame code into login.htm and put the Password Wizard code into password.html. I can't get 2.htm to load for some reason. http://www.flashstrap.com
http://www.lodipc.com
Another way to edit your current setup would be to put the frame code into login.htm and put the Password Wizard code into password.html. I can't get 2.htm to load for some reason. http://www.flashstrap.com
http://www.lodipc.com
Thank You for responding Adam..
OK I think I did what you said and now I can't get to page 2. For some reason the frames are not reconized. Here is what I have now and I have tried this 100 times in different ways.
Here are the pages.Home page http://home.twcny.rr.com/jpaker
Protected page http://home.twcny.rr.com/jparker/2.htm
The protected page which is page 2. The button on the home page to go to page 2 is directed to the login page with now has the frames. (http://home.twcny.rr.com/jpaker/login.htm) and the code on the login page is:
<html>
<head><frameset rows="*,100%" border=0>
<frame name=hidden src=hidden.html marginwidth=0 marginheight=0 scrolling=no frameborder=0>
<frame name=visible src=password.html marginwidth=0 marginheight=0 scrolling=auto frameborder=0>
</frameset>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>password</title>
</head>
<body>
</body>
</html>
So now the code on the password page holds the login box to type your ID and PW is:
<HTML>
<HEAD>
<TITLE>password.swf</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" link="#0000FF" vlink="#FFFF00">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0"
ID=password WIDTH=120 HEIGHT=104>
<PARAM NAME=movie VALUE="password.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=loop VALUE=false>
<PARAM NAME=wmode VALUE=false>
<EMBED src="password.swf" loop=false quality=high
WIDTH=120 HEIGHT=104 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</DIV>
</BODY>
</HTML>
And the page I am tring to protect which is page 2 the script code is in and it is:
<html>
<head><script type="text/javascript">
<!--
if (parent.frames.length==0)
window.location.replace("http://home.twcny.rr.com/jparker/login.htm")
//-->
</script>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<script language="JavaScript">
<!--
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
</head>
<body onload="FP_preloadImgs(/*url*/'button3.jpg', /*url*/'button2.jpg', /*url*/'button15.jpg', /*url*/'button16.jpg')">
<p>This is page 2</p>
<p> </p>
<p> </p>
<p><a href="http://home.twcny.rr.com/jparker">
<img border="0" id="img1" src="button1.jpg" height="20" width="100" alt="home" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button2.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button1.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button3.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button2.jpg')" fp-style="fp-btn: Border Bottom 1; fp-orig: 0" fp-title="home"></a><a href="http://home.twcny.rr.com/jparker/login.htm"><img border="0" id="img2" src="button14.jpg" height="20" width="100" alt="page 2" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'button15.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'button14.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'button16.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'button15.jpg')" fp-style="fp-btn: Border Bottom 1" fp-title="page 2"></a></p>
<p> </p>
</body>
</html>
OK I think I did what you said and now I can't get to page 2. For some reason the frames are not reconized. Here is what I have now and I have tried this 100 times in different ways.
Here are the pages.Home page http://home.twcny.rr.com/jpaker
Protected page http://home.twcny.rr.com/jparker/2.htm
The protected page which is page 2. The button on the home page to go to page 2 is directed to the login page with now has the frames. (http://home.twcny.rr.com/jpaker/login.htm) and the code on the login page is:
<html>
<head><frameset rows="*,100%" border=0>
<frame name=hidden src=hidden.html marginwidth=0 marginheight=0 scrolling=no frameborder=0>
<frame name=visible src=password.html marginwidth=0 marginheight=0 scrolling=auto frameborder=0>
</frameset>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>password</title>
</head>
<body>
</body>
</html>
So now the code on the password page holds the login box to type your ID and PW is:
<HTML>
<HEAD>
<TITLE>password.swf</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" link="#0000FF" vlink="#FFFF00">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0"
ID=password WIDTH=120 HEIGHT=104>
<PARAM NAME=movie VALUE="password.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=loop VALUE=false>
<PARAM NAME=wmode VALUE=false>
<EMBED src="password.swf" loop=false quality=high
WIDTH=120 HEIGHT=104 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</DIV>
</BODY>
</HTML>
And the page I am tring to protect which is page 2 the script code is in and it is:
<html>
<head><script type="text/javascript">
<!--
if (parent.frames.length==0)
window.location.replace("http://home.twcny.rr.com/jparker/login.htm")
//-->
</script>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<script language="JavaScript">
<!--
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
</head>
<body onload="FP_preloadImgs(/*url*/'button3.jpg', /*url*/'button2.jpg', /*url*/'button15.jpg', /*url*/'button16.jpg')">
<p>This is page 2</p>
<p> </p>
<p> </p>
<p><a href="http://home.twcny.rr.com/jparker">
<img border="0" id="img1" src="button1.jpg" height="20" width="100" alt="home" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button2.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button1.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button3.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button2.jpg')" fp-style="fp-btn: Border Bottom 1; fp-orig: 0" fp-title="home"></a><a href="http://home.twcny.rr.com/jparker/login.htm"><img border="0" id="img2" src="button14.jpg" height="20" width="100" alt="page 2" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'button15.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'button14.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'button16.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'button15.jpg')" fp-style="fp-btn: Border Bottom 1" fp-title="page 2"></a></p>
<p> </p>
</body>
</html>
The frames are working, but the 100% page isn't loading. The links in the code point to password.html, but the file is password.htm. See how that goes after fixing the links or renaming the filename.
http://www.flashstrap.com
http://www.lodipc.com
http://www.lodipc.com
Thank you Adam that was it. I changed the HTML to HTM and it worked... Thanks Again Coos14
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.