Click to See Complete Forum and Search --> : opening Window in new frame


shweta1234
July 9th, 2007, 07:38 AM
Hi all,


Can I open a window in a frame?

I have tried 2 functions
1. window.open()
2. window.top.location.href =my url


which is opening a window in Full screen and I want to open it in Bottom Frame of the page.


Is there any other method apart from this where I can specify name of the frame?

PeejAvery
July 9th, 2007, 08:20 AM
You need to specify the target.

A link...
<a href="http://www.google.com" target="bottomframename">Open in bottom</a>
JavaScript
parent.bottomframename.location = 'http://www.google.com';

HanneSThEGreaT
July 9th, 2007, 11:27 AM
You see shweta1234, the Target specifies where you want your linked page to appear ( as explained by PeejAvery ) :thumb:

You get these Special Target names :

_self : This will open the linked page in the current frame

_top : This will open the linked page in the entire browser window, thus removing the frames

_blank : This will open the linked page in a new, empty browser window

_parent : This refers the frame to a parent frameset when there are embedded framesets ( parent & child ) and you cannot use the Frame Name. You would use this when you were in the child Frameset and wanted the page to open in the parent frameset.

But, if you gave your frames names, you could just use the frame name as your target, as PeejAvery explained. :)