Jump to content

Archived

This topic is now archived and is closed to further replies.

wnemay

Framesets

Recommended Posts

[!--fonto:Arial--][span style=\"font-family:Arial\"][!--/fonto--]I am developing a PHP application but decided to use framesets on my index page, from there on I would use no framesets. My problem is this. The user needs to log in to the application first, so if no session exists he will be directed back to the login page. There is also a logout page, and once the users click on the logout link he will be directed back to the login page after the session has been destroyed. Within a frame I am having issues with the frameset not being destroyed. Is there any way to destroy the frameset and have the login page actually show on the whole of the screen. I tried directing to the page using PHP [!--coloro:#009900--][span style=\"color:#009900\"][!--/coloro--][!--fonto:Lucida Console--][span style=\"font-family:Lucida Console\"][!--/fonto--]header()[!--fontc--][/span][!--/fontc--][!--colorc--][/span][!--/colorc--] and JavaScript [!--coloro:#009900--][span style=\"color:#009900\"][!--/coloro--][!--fonto:Lucida Console--][span style=\"font-family:Lucida Console\"][!--/fonto--]window.location()[!--fontc--][/span][!--/fontc--][!--colorc--][/span][!--/colorc--]
I also tried sending the request to [!--coloro:#3333FF--][span style=\"color:#3333FF\"][!--/coloro--][!--fonto:Lucida Console--][span style=\"font-family:Lucida Console\"][!--/fonto--]login.php#_parent[!--fontc--][/span][!--/fontc--][!--colorc--][/span][!--/colorc--] and [!--coloro:#3333FF--][span style=\"color:#3333FF\"][!--/coloro--][!--fonto:Lucida Console--][span style=\"font-family:Lucida Console\"][!--/fonto--]login.php#_top[!--fontc--][/span][!--/fontc--][!--colorc--][/span][!--/colorc--] of which neither worked.

I need to somehow [b]destroy the framesets[/b].[!--fontc--][/span][!--/fontc--]

Share this post


Link to post
Share on other sites
Yeah, like I said I tried that, however, I found this to work just fine...

[!--coloro:#3333FF--][span style=\"color:#3333FF\"][!--/coloro--][!--fonto:Lucida Console--][span style=\"font-family:Lucida Console\"][!--/fonto--]<script type="text/javascript">
[!--coloro:#FFCC66--][span style=\"color:#FFCC66\"][!--/coloro--]//This script destroys a frameset that might be set.[!--colorc--][/span][!--/colorc--]
if (top.frames.length!=0)
{ if (window.location.href.replace)
top.location.replace(self.location.href);
else
top.location.href=self.document.href;
}
</script>[!--fontc--][/span][!--/fontc--][!--colorc--][/span][!--/colorc--]

Thanx anyway...

Share this post


Link to post
Share on other sites
[!--quoteo(post=343309:date=Feb 7 2006, 01:13 AM:name=wnemay)--][div class=\'quotetop\']QUOTE(wnemay @ Feb 7 2006, 01:13 AM) [snapback]343309[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Yeah, like I said I tried that, however, I found this to work just fine...

[!--coloro:#3333FF--][span style=\"color:#3333FF\"][!--/coloro--][!--fonto:Lucida Console--][span style=\"font-family:Lucida Console\"][!--/fonto--]<script type="text/javascript">
[!--coloro:#FFCC66--][span style=\"color:#FFCC66\"][!--/coloro--]//This script destroys a frameset that might be set.[!--colorc--][/span][!--/colorc--]
if (top.frames.length!=0)
{ if (window.location.href.replace)
top.location.replace(self.location.href);
else
top.location.href=self.document.href;
}
</script>[!--fontc--][/span][!--/fontc--][!--colorc--][/span][!--/colorc--]

Thanx anyway...
[/quote]

Do you have an alernative solution for users with javascript disabled? I thought one of the biggest advantages of using server-side scripting is how it make frames completely obsolete. Surely just using include statements would give the desired result?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.