wnemay Posted February 5, 2006 Share Posted February 5, 2006 [!--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--] Quote Link to comment https://forums.phpfreaks.com/topic/3328-framesets/ Share on other sites More sharing options...
ryanlwh Posted February 6, 2006 Share Posted February 6, 2006 target="_top" Quote Link to comment https://forums.phpfreaks.com/topic/3328-framesets/#findComment-11389 Share on other sites More sharing options...
wnemay Posted February 7, 2006 Author Share Posted February 7, 2006 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 Link to comment https://forums.phpfreaks.com/topic/3328-framesets/#findComment-11401 Share on other sites More sharing options...
Javizy Posted February 12, 2006 Share Posted February 12, 2006 [!--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? Quote Link to comment https://forums.phpfreaks.com/topic/3328-framesets/#findComment-11606 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.