Using password wizard with i frames

Home » Forums » Password Wizard » Using password wizard with i frames


Registered User
2 posts

My site is already complete but I need to password protect certain pages. I'm using i frames and need to know if it will be necessary to rebuild my entire site or is there a work around?


Trial User
146 posts

Well, it sort of depends on what you're trying to do. Are you trying to have them log in through the iframe? A little more information would help a bunch!


Registered User
2 posts

Dave,

The site is located at http://freightbrokersofamerica.net The one I'm concerned with is the tracking page and I need to protect it. Your software works fine but there's nothing stopping anyone from accessing the protected page by simply typig in the url.


Trial User
146 posts

Hm..

Well, as long as the only link to access the pages you need to protect (without typing in the URL directly) is through the login box, it should work fine. You'll just need to paste in the Protection Code into the pages which are being viewed in the iFrame.

This is the protection code:

<script language=javascript>
<!--
if (parent.frames.length==0)
window.location.replace("http://freightbrokersofamerica.net/")

// -->
</script>

Again, this will only work if you don't link directly to the protected page-- the only way to access it has to be logging in (as normal) or by typing in the url (which this code will block).

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.