By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,970 Members | 1,669 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,970 IT Pros & Developers. It's quick & easy.

Help! Frame display problem!

P: n/a
A newbie question for you all:

Suppose you have a webpage with two frames: a main frame, and a second
frame. You have several hyperlinks to other websites in the second
frame. What you want is this: when someone clicks one of the
hyperlinks in the second frame, the website that it points to will
appear in the main frame.

Well, for most hyperlinks, this is easy. You just include the string

target="mainFrame"

in the HTML of the second frame, as in:

<A href="http://www.google.com/" target="mainFrame">Google</A>

Now, for most websites, this works just fine. The website displays
nicely in the main frame.

BUT: for some websites, a NEW window is spawned which eliminates your
two-frame structure.

Is there an easy way to prevent this?

Thanks in advance!

Brett

dbrett-phantasmagorical
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Brandon wrote:
Suppose you have a webpage with two frames: a main frame, and a second
frame. You have several hyperlinks to other websites in the second
frame. What you want is this: when someone clicks one of the
hyperlinks in the second frame, the website that it points to will
appear in the main frame.

Well, for most hyperlinks, this is easy. You just include the string

target="mainFrame"

in the HTML of the second frame, as in:

<A href="http://www.google.com/" target="mainFrame">Google</A>

Now, for most websites, this works just fine. The website displays
nicely in the main frame.

BUT: for some websites, a NEW window is spawned which eliminates your
two-frame structure.

Is there an easy way to prevent this?


No. If an ordinary link is loading a web page into a frame and then a
new window is being opened (or the new page is re-loading itself into
the topmost frame in place of your frameset) then it is code within the
new page that is being loaded that is doing this. You cannot get at that
code because of cross-domain security restrictions. So you cannot stop
it from acting.

Some people just don't want their web sites displayed in other people's
framesets, and others insist on opening a new window for their site
anyway.

Richard.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.