Password Protecting Pages Thru Flash Password Wizard

Home » Forums » Password Wizard » Password Protecting Pages Thru Flash Password Wizard


Registered User
7 posts

Help! I've been stressing over this for days now, and now at my wits end.

I've been using the trial version of Flash Password Wizard for some time now. I discovered people where able to bookmark some pages which I now want secured.

So I found your article called: Forcing Logins through the Applet Password Page. The script there worked great, it does exactly what I need it to do.

BUT, with this new code I can no longer see my DHTML menu. The page loads without my menu on each page, whether they have the secure code or not. What am I doing wrong? Do I need the full version of the Password Wizard in order to fix this? I can't imagine this would have anything to do with DHTML menus being compatible. Below is the script I'm using in HTML Editor...

My code on the logon page:
<frameset rows="*,100%" border=0>
<frame name=hidden src=hidden.html marginwidth=0 marginheight=0 scrolling=no frameborder=0>
<frame name=visible src=newpassword.html marginwidth=0 marginheight=0 scrolling=auto frameborder=0>
</frameset>

My code on the protected page:
<script language=javascript>
if (parent.frames.length==0)
window.location.replace("http://www.trinaddie.com/fake.html")
</script>

When the protected page loads, my menu is gone and there is an error on the status bar "Done, but with errors". When I double click on the error message, it states "access is denied"

Any advice would be appreciated!


Temporary User
5,410 posts

Hows about a link so people can see all the code and see what's going on? CoffeeCup... Yeah, they are the best!


Registered User
7 posts

Sure thing, here is a link to the log on page I set up:
http://www.trinaddie.com/fake.html

From there I enter username: hunt and password: hunt and I'm brought to my client page, which should be secure and not able to access any other way.

But it's not displaying my menu, which is usually displayed down the left side of this page.

I'm sure you can see my sloopy code, can you see what I'm doing wrong?


Senior Advisor
3,144 posts

First, I suggest you click on profile and change your forum name to something other than your email address. This is a public forum and spammers can come here to harvest email addresses.

When I first got to the protected page, I saw what may have been the menu just flash on the left, but I did not get a good look at it. I just took a quick look at your code. You have two <body> tags, where you should only have one per html page. One is located properly just below the </head> tag, and the other is located just shortly after the end of the menu code.

There are many coding errors there. Try visiting http://validator.w3.org/ and get a list of errors.

When I have more time, I will take another look at your code and see what other things I can suggest to help. Maybe some of the other forum members will see things I don't and offer suggestions. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Temporary User
5,410 posts

There is a javascript error as well. Something to do with access denied to the protected Blue Domino url.

I believe something is wrong with your frames since bookmarking the protected page is recalling that page. CoffeeCup... Yeah, they are the best!


Registered User
7 posts

Thanks for taking the time to look.
I couldn't find the second <body> tag you are referring to.

However, with a little more tinkering around, I found EVERY page after the logon screen has the same error on it, regardless of if it has the security script or not. I only put this security script...

<script language=javascript>if(parent.frames.length==0)window.location.replace("http://www.trinaddie.com/fake.html")</script>

...on one page to test it, until I have this menu issue resolved. So in other words, if I log on as any other user, I have the same problem. Which makes me believe the problem is on the log on page, not the protected page.

Here is the same error I get on every page:
script error on line 134, access denied.

Line 134 falls in the middle of my DHTML menu code. Here's the script I have on that line:
var Par=parent.frames[0]&&FirstLineFrame!=SecLineFrame?parent:window;

Is my log on page the "parent frame" it's referring to? If so, should I edit this script (even though it says not to) in some way?

As you can tell from my messy code, this is not my forte. Any help you can give would be so helpful.


Senior Advisor
4,316 posts

Hi everyone, this question was very interesting. I hope you don't mind me jumping in.
I did some testing and found that even if you use our CC Flash Menu Builder, the menu will not show up.
http://www.coffeecuphelp.com/djean/pass … panel.html
The user and password is "coffee" for both.

This is what it should have looked like:
http://www.coffeecuphelp.com/djean/passwordccmenu/menu.png

If you take the Force Login Script out of the <head> then the menus will show up. So it seems that there is a conflict between the login force script and flash or java menu scripts. I have submitted this situation to CC.

Misstrinah, I hope you don't mind me sharing this; but you do have some code that needs cleaning up. I mention this to help you with your site to be better picked up by search engines and so that your site will display more efficiently. Darce Jean


Senior Advisor
3,144 posts

Miss Trina,

I haven't used password protection, so I will not comment on that.

I missed your message where you stated you could not find the second body tag. In you code, look about 10 - 15 lines down from the very top. You will see this:
</head>
<body>
<body bgcolor="#FFFFFF" text="#000000" link="#76C550" vlink="#FFCC00" alink="#FFCC00">

Notice the two lines that start <body and one has much more with it? Those are both body tags, and you should remove one of them. The first one is good, but the second one is using a method of coding that is depreciated (means they plan to discontinue using it). If you want to use the style on the second one, there are three ways you can do that. One is to use a separate style sheet, second is to use a style section in your page, and the third way is to use inline style which is similar to what you are using.

Inline style body tag would look like this:
<body style="bgcolor:#FFFFFF; text:#000000">
For your link codes, go to the first head section on your page and add an internal style sheet looking something like this:
<style type="text/css">
a:link {color: #FF0000} /* unvisited link */
a:visited {color: #00FF00} /* visited link */
a:hover {color: #FF00FF} /* mouse over link */
a:active {color: #0000FF} /* selected link */
</style>

You can adjust the colors as needed. I just copied that off the W3Schools site.

You could also just use the first body tag, and put your body color in the internal style sheet.

You also have two head sections in your code. The first one is correctly located at the head of your code, and the other is located at the bottom of your code. You should move the meta tag from the bottom to the top of your code, and delete the head section at the bottom of your code.

CSS (Cascading Style Sheets) may seem difficult at first, but once you use it and find the power it gives, you will be happy that you have it. Using inline styles means you have to search all your code to make individual changes. With the external and internal style sheets, all you style is located where it is easy to find.

Hope this is helpful. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Senior Advisor
3,116 posts

I don't know syntax well, but could it be the first line in the header beginning the redirecting code:
<script language=javascript script type='text/javascript'>

The line in my protected page is simply:
<script language=javascript>

Seemed a bit redundant, but my page has Flash Menu Builder not DHTML, so it may not make a difference, just stood out to me. http://www.flashstrap.com
http://www.lodipc.com


Senior Advisor
4,316 posts

Yes, when I changed the first line to what you stated, it seemed to work for me. I am using CoffeeCup Flash Menu Builder 3.1. Darce Jean

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.