Jump to content


Photo

Framesets


  • Please log in to reply
3 replies to this topic

#1 wnemay

wnemay
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 05 February 2006 - 05:30 PM

[!--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 destroy the framesets.[!--fontc--][/span][!--/fontc--]

#2 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 06 February 2006 - 08:06 PM

target="_top"
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#3 wnemay

wnemay
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 07 February 2006 - 01:13 AM

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...

#4 Javizy

Javizy
  • Members
  • PipPipPip
  • Advanced Member
  • 44 posts

Posted 12 February 2006 - 04:23 AM

[!--quoteo(post=343309:date=Feb 7 2006, 01:13 AM:name=wnemay)--][div class=\'quotetop\']QUOTE(wnemay @ Feb 7 2006, 01:13 AM) View Post[/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?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users