Faqts

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

60 of 117 people (51%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How do I handle frames & window openings in PHP, for instance if I have a frames page & I want to eliminate the frames, how do I do this using PHP ?
I seem to have the same problem. I dont want to use frames but i want my news blog to open in a sect

Nov 22nd, 2008 20:37
haytham ali, dman, i can do it, ha mo, Paul Coldrey, Mahesh K, Julius Pratt, http://msryat.org


The problem you are facing is that frames are a client-side entity and 
PHP is a server-side language. No information about the frame layout 
is 
passed to the server because the frames are fully implemented in the 
browser (with each frame really acting as a full-blown browser 
window). 
Hence the only way to deal with frames from the server is to target 
the 
top-most window/frame of the set you wish to change and redraw all its 
child windows. There may be some neat way to make the top frame the 
target using the header(...) function (but I don't know it). Your 
other 
option is to send some JavaScript with the page and use it to 
rearrange 
the frames (since it is client-side it can manipulate the frames 
inside 
the browser).
Here is the javascript code to break out of frames,
if(top.location != self.location)
{
  top.location.replace(self.location);
}
http://6rb.com
http://fr7.com
http://dir.msryat.org
http://6ef.com
http://forums.msryat.org
http://www.arabcar.com
http://www.alshalah.com
http://msryat.org/egypt/1.htm
http://msryat.org/egypt
http://msryat.org