Open New Browser From Frame ?

My page has two frames. The left one contains some links who are
               directed to the main frame.
               I need to be able get out of the frame either by destroying the frame but
               stay on the same browser
               or open a new browser.
               The last option would be ideal but I want the new browser to start where
               the old stops.
               ie if was on yahoo.com I want the new browser to start on Yahoo.com
               and not on your defaut page.
               Exactly like the "open Frame in new window" funcion on Netcape 4. But
               working on all browser.

               Is it possible ?

               I am really stuck at that point and would need some savvy advices.

I tried

<a href="#"
               onClick="javascript:window.open(parent.mainframe.location)">Click Me</a>

but i receive a :
:missing semicolon before statement"  error

               Thankfully,

              chris
chrispajeAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jflConnect With a Mentor Commented:
This works for N4:

<a href="#" OnClick="window.open(parent.RightFrameName.location);">Click Me</a>

IE4 will do nothing about this, but try to look at MS's site for more info on window.open
See if you can find an example.


0
 
retsCommented:
To stay in the same browser use:

<A HREF="link.html" TARGET="_top">

_top is the special word which indicates to 'start all over from the top'

To create a completely new browser use:

<A HREF="link.html" TARGET="_new">

_new is the special word which indicates to 'start a new browser'

-K
0
 
chrispajeAuthor Commented:
I would like to have the new browser to open to the current url not a pre-defined one.

thank you
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
tecbuilderCommented:
What you need is:

<a href="#" onClick="self.location=parent.RightFrameName.location" target="_top">Click Me</a>

This will open what ever you are looking at in the right frame and load it so that it covers (sits on top) of your frames.  When you press the 'Back' button, you will go back to your frames page.
0
 
chrispajeAuthor Commented:
<a href="#" onClick="self.location=parent.RightFrameName.location" target="_top">Click Me</a>

with RightFrameName being "main still makes the left frame appearing in the right one and not whatever url is on the right frame.

Any idea
0
 
tecbuilderCommented:
Evidentally, the onClick method did not act like I thought it would.  The anchor below will bring whatever is in the right frame to the top in the same browser window.

<a href="javascript:top.location=parent.RightFrameName.location" target="_top">Click Me</a>

If this is what you want and works for you, please allow me the opportunity to post it as the answer.
0
 
chrispajeAuthor Commented:
Thank you

This is excactly what I need.It works great on N3 and 4.

Any idea for IE browser.


0
 
chrispajeAuthor Commented:
Bummer !!

Actually

<a href="#" OnClick="window.open(parent.RightFrameName.location);">Click Me</a>

only works for when the files are located in your hard drive.not online. As soon as you go online you get that

The requested URL /[object was not found on this server.

I am getting desperate here

JavaScript:top.location=parent.main.location

doesn't work either. It gives me the javascript line on the url location bar :

Location : JavaScript:top.location=parent.main.location

and the name of the default domain name in the body message

Anybody have an idea ??


0
 
tecbuilderCommented:
Since you accepted the answer you won't get any help from anyone else since it costs us (experts) points.  If you would have reviewed my answer, you would have found that it does what you wanted and will work on MSIE and Netscape.

I would suggest not being so quick to accept an answer until your question is solved.  Once you accept an answer the answerer may or may not respond.  They are not getting any points for the additional questions.  As it stands, you gave someone points for a partial answer and the other part they tell you to go find the answer.  Isn't that what you came here for?
0
 
chrispajeAuthor Commented:
Sorry to have been so prompt to take the answer for correct.
I'll try to get the answer somewhere else since I am out of points. Thanks anyway.

but this line definitely doesn't work.

<a href="javascript:top.location=parent.RightFrameName.location" target="_top">Click Me</a>

0
All Courses

From novice to tech pro — start learning today.