1

I've been researching this topic for the past few hours with little success. I wish to redirect from the content of a frame, to the parent of the frame using php. .. The only reason I think it's possible is because I disabled javascript on my browser and phpMyAdmin was still able to redirect me when the session ran out of time.

I also realize it is most likely not possible, given that frames are a client-side thing, and php is not.

That in mind, I'm wondering how phpMyAdmin does it. I do not wish for js to be required for my web application.

Daedalus
  • 7,586
  • 5
  • 36
  • 61

1 Answers1

0

If an iframe has links which looks like this:

<a href="somepage.php" target="_parent">Some page</a>

it should work, as long as both pages or on the same domain.

Alternatively, take a look at this answer: How to force link from iframe to be opened in the parent window

Community
  • 1
  • 1
Rikard Uppström
  • 1,413
  • 9
  • 16
  • While I thank you for the effort you put into this answer, it does not answer my question, as my question is how to redirect, not how to direct links. – Daedalus Sep 05 '12 at 09:08
  • Ok, I misunderstood you. Based on what I know, to perform a serverside redirect, which redirects the parentframe is impossible without using javascript. – Rikard Uppström Sep 05 '12 at 09:13
  • I figured as much, but if that's the case, my question then becomes.. how does phpMyAdmin do it? I disabled my js and it was still able to redirect the parent. – Daedalus Sep 05 '12 at 09:15
  • That is interesting. What led up to the redirect? Did you perform any sort of action on the page? – Rikard Uppström Sep 05 '12 at 09:23
  • Yes, if there is a long period of inactivity, and I click say.. a navigation link or a tab, it will redirect. But both of these items are in frames, and the navigation link does have ``. – Daedalus Sep 05 '12 at 09:27