Breaking a frame from a different frame

R

Rob Gordon

Hi,

I have a web portal I have developed where I have used frames for the
navigation system. There is a header frame, left hand "menu" frame, a
"main" frame and a "footer" frame. Everything link that a user clicks
is displayed in the "main" frame.

I want to give my users a function called "New Window" in the "footer"
frame that will "break" the main frame and open whatever is there in a
separate window. This will allow me to add more interesting
contents since I will no longer be "trapping" users and sites in my
frame system. The site where I would like to use this function is at
www.caltrade.com.

I posted this issue here a while back and received this response:

"To open the document that is in the main frame in the same window...
In the bottom frame...

<a href="#" onClick="top.location = top.frames
['mainFrameName'].document.location;return false;">click here to open
the document in this window</a>

where mainFrameName is the name you gave the main frame in the
frameset.

If you want it in a new window...
<a href="#" onClick="window.open(top.frames
['mainFrameName'].document.location,'','');return false;">click here
to open the document in a new window</a>"

This ALMOST worked. In fact, it worked perfectly for pages that I
created that were on my own server. It didn't work at all, however,
for links from outside sites. When I tried it for outside links a
copy of the "footer" frame would open in the "main" frame. I
learned later that this is because some kind of Javascript security
protocol was violated.

I am not a programmer, and unfortunately don't have money right now to
hire one, but this function is really important for my site if there
is some way to make it work. It would allow me to use the frames for
navigation- which I like, but still allow the user to visit the links
independently- and this would also be less offensive to the managers
of other sites since I wouldn't be trapping their work in my frames.

Could someone tell me if this is absolutely, positively impossible? Is
some kind of workaround possible? For example, would it be possible
to somehow store the url that is displayed in the main frame and then
open it in a new window? Any other ideas on how to make this work
(even non-Javascript) would be appreciated.

Thanks

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top