Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Frames & No Frames


Message #1 by "T Berry" <tberry@v...> on Fri, 18 Jan 2002 14:42:51
Hi Tom

You had the right idea with target="top".  The problem with this is that 
the browser looks for a frame or window named "top".  As this does not 
exist, it opens a new window.

To get round this the 'built-in' frames are prefixed with an underscore.  
The ones available at the moment are:
 _self       Loads into the same frame (default)
 _top        Loads into the topmost frame of the current window
 _blank      Loads into a new unnamed window
 _parent     Loads into the parent of the current frame.
 _search     Loads into the search pane (IE5+)
 _media      Loads into the Media Bar (IE6)

So for your site you will need target="_top".

Hope this helps
Philip

> I have a web app where using FRAMES are needed on 2 of the pages. Any 
> other page though, it is better to leave as individual pages. I have 
tried 
> setting target="top" in the <form> tag in the frames page, but the first 
> time a user submits this form, a NEW browser window appears.
> 
> I have also tried using
> 
>    if (self != top) top.location = self.location;
> 
> in the non-frames windows, but this forces an error from the server (I'm 
> using JSP). Are there any alternatives for going from Frames to No 
Frames?
> 
> Thank you
> Tom Berry

  Return to Index