[nycphp-talk] PHP and framesets

Christopher Hendry chendry at
Wed Aug 6 12:57:46 EDT 2003

yeah - what Hans said.

I've had plenty of success dropping PHP into javascript, ie:
<script language='javascript'>

One possible solution, though convoluted, would be to have the frameset drop
a cookie with the _top URL and then in the subsequent frame PHP could read
from the same cookie and get the URL.  Otherwise, I often use hidden forms
on the client side and document.submit() the values back into a PHP script -
when I need info from the client-side in the server-side.

I'd love to hear other solutions...


-> -----Original Message-----
-> From: talk-bounces at
-> [mailto:talk-bounces at]On Behalf Of Hans Zaunere
-> Sent: Wednesday, August 06, 2003 12:54 PM
-> To: NYPHP Talk
-> Subject: Re: [nycphp-talk] PHP and framesets
-> Sexton, David wrote:
-> > This seems simple enough, but maybe it isn't that simple...
-> Does anyone know
-> > of a way to have PHP return the top level document's location?
-> Basically I
-> > have a script that references PHP_SELF... if you throw it into
-> a frameset,
-> > it naturally returns the frame source URL, not the frameset's.
-> As far as I know, a frameset is a client-side thing, so PHP
-> wouldn't know anything about it natively.  You could, perhaps,
-> have some kind of Javascript callback to a php script, but I
-> don't really know how you'd do it in JS :)
-> H
-> _______________________________________________
-> talk mailing list
-> talk at

More information about the talk mailing list