Forcing Logins through the Applet Password Page
To make sure that no one goes directly to the protected page, instead of through the Password Applet, you can use the following steps.
It requires use of Frames and JavaScript (
not available in VisualSite Designer). If you are unfamilair with Frames, I suggest you read over this article, it explain them in an easy to understand fashion.
HTML Frames
1. This step should be done on the page where you want the password applet to be. For instance, I would create a page called "index.html" and put the following code in it:
(The Frameset code must be before the <BODY> tag)
<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>
The "password.html" should have the Password Wizard code in it. It's what is displaying the Password Wizard login box.
2. This following code should be put in the <head> tag on the page you are protecting.
<script language=javascript>
<!--
if (parent.frames.length==0)
window.location.replace("URL_to_Password_Page")
// -->
</script>
"URL_to_Password_Page" should point back to "index.html" in this case. It's basically saying "You didn't get here through the right channel, go back to the login page"
IMPORTANT: Within Password Wizard you will need to make sure the target for the link is set to _self.
Password Wizard Help Index |
Password Wizard Homepage