Previous Thread
Next Thread
Print Thread
Rate Thread
#284256 03/13/2005 1:53 PM
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
This page opens an admin function in an iframe. If they are not logged in then the errorlogin.html is displayed (within the iframe)with a link to login (form) as as an admin. Problem is that if they login at that point it brings up the entire page again within the iframe. How can I get around this?

This is what is displayed in the iframe

echo "<P>You do not have permissions to view this page.</P>";
echo "<P><a href="../errorlogin.html" >Try Logging in as an Administrator.</a></p>";
exit;
}
Attachments
126130-php.gif (0 Bytes, 14 downloads)

Last edited by ChAoS; 03/13/2005 2:01 PM.
Sponsored Links
barbiro #284257 03/13/2005 2:43 PM
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
you'll need to use the target attribute, not sure which though

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Ya I figure I gotta use something like target=new or parent but I cant get the syntax correct for PHP and searching the net hasn't yielded better.

barbiro #284259 03/13/2005 3:05 PM
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Use:
echo "<P><a href="../errorlogin.html" target="_parent">Try Logging in as an Administrator.</a></p>";

-Fusion- #284260 03/13/2005 8:22 PM
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
thats close but since the iframe is opened from log.ihtml (parent which calls the log.php script. It just reopens the iframe


log.ihtml
Code
 <iframe src="login/logs/index.html" width="500" height="500" name="Login History> <br />    {HELPNOIFRAME} <a href="login/logs/index.html">Login History</a> <br />  </iframe>


from index.html
Code
 <br /><frameset cols="283,*"> <br />	<frame name="contents" target="main" src="archive.php"> <br />	<frame name="main" src="log.php"> <br />	<noframes> <br />	<body>


which in turn brings us
Code
echo "<P>You do not have permissions to view this page.</P>"; <br />//echo "<P><a href=\"../errorlogin.html\" >Try Logging in as an Administrator.</a></p>"; <br />echo "<P><a href=\"../errorlogin.html\" target=\"_parent\">Try Logging in as an Administrator.</a></p>"; <br />exit; <br />}




which is only 1 half of the iframe. The other script is almost identical just different info

target="_new" works but the screen that they came from remains open. If I could get that to close that would be sufficient but I would rather do everything in the iframe.

Last edited by ChAoS; 03/13/2005 8:27 PM.
Sponsored Links
barbiro #284261 03/14/2005 4:00 AM
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
try _top instead of _parent

-Fusion- #284262 03/14/2005 5:38 PM
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Thankyou Astaran-That works great

Now maybe you can help me with this

I have a link that opens one category section of my forum in the iframe (help section for app) It looks great in the iframe but the header of my forum is too large (the category resizes to fit apparently) How can I strip the header out for just this section/instance?)
http://emeraldforestseattle.com/ubbthreads/ubbthreads.php?Cat=0&C=6"

OR can I just take put this part onto its own dsplay page using content islands or something like that? And how

[]http://emeraldforestseattle.com/forums/photopost/data/526/6help.png[/]


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)