954,591 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

HTML frames problem

I have a website whose homepage has 4 frames. 1 at top(horizontal) and 3 vertical below it. The middle vertical frame displays all the contents of pages when links in other frames are clicked.

I have a link in top frame to logout the user when clicked. In this link's "A" tag, i've set target to "_top" so that after logout, the homepage is displayed in full window and not confined to middle vertical frame.

Now i use PHP sessions. When the session expires, homepage should be displayed.

I want contents of linked pages to be displayed in middle vertical frame so i didn't set target to "_top" in their "A" tag but set it to "middle_frame".

When the session gets expired(but i don't know if it has expired) and if i click on any link other than logout link(present in other frames), the homepage gets displayed in middle vertical frame instead of in full window(since their target is set to middle_frame).

I want the homepage to be displayed in full window. Any ideas???

rajesh1158
Light Poster
41 posts since Oct 2010
Reputation Points: 10
Solved Threads: 1
 
<script type='text/javascript'>
<!--//
if (window != top) { top.location.replace(self.location.href); }
//-->
</script>

put a framebreaker in the head of the page you wish to ensure is n ot in the frameset. the above codescrap is one,

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

hey thanx!!! it worked. thank u sooooooooo much.

rajesh1158
Light Poster
41 posts since Oct 2010
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: