Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with frames

Status
Not open for further replies.

delphidestructor

Programmer
Oct 20, 2000
67
I need some advice on how to make my frames work correctly with a login script. Ok here is what I want to happen. I have some ideas but wanted to know the best way of doing this. I have a menu frame with a login link to direct the main frame to a login page. That is no problem. But after a successful login, I then want to have the menu frame reload its self with a logout link. I know this is nothing new I see it all the time I’m just not sure how it is done. I’m using php and mysql but maybe I need to post this in the html forum? Any help would be great. Thanks, Mike. Mike
 
You can do what you describe with frames and JavaScript. But it's not pretty. And the minute someone hits your page with JavaScript turned off, the thing breaks.

I recommend that instead of frames, you place your content on a single page, with your content placed in tables. That way you only have one page to try to refresh at a time. Want the best answers? Ask the best questions: TANSTAAFL!
 
Assuming your Menu frame is named Menu then put the following Javascript in the head of the document returned in the mainframe after successful login

<script>
<!--

function pageloader()
{
parent.Menu.location.href=
&quot;}

//-->
</script>

Then change the body tag in the same document as follows
<body onload =pageloader();>


Menu2.html would be a modified version of your existing menu
ie login link replaced with a logout link
Regards
Ian Infinity exists! - I just haven't worked out a way to get there yet.

| |
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top