tags:

views:

118

answers:

2

Hi

I have a website which splits the screen into two frames; the top half is the name of my website; the bottom half is an advertised website.

I want it so if the user clicks the link on the top half (my website) the user is taken to my homepage.

This works, but my website is loaded into the top half and not the whole screen.

How do I get the link to remove the frames and display my website in the whole browser.

Here's what I'm talking about:

http://www.thefacebookies.com/advertise.php

Have tried target="_top" which doesn't work.

Many thanks.

A: 
<A HREF="http://www.xyz.com" TARGET="_top">

"_top" loads the linked document in the topmost frame, that is, the new page fills the entire window.

See

target Property

From javascript you can

parent.location = new location;
rahul
Doesn't work either - still in the top frame.
Oliver
+4  A: 

You have:

<a onClick="window.location ='bet.php'" target="_top">

That should be:

<a href="bet.php" target="_top">
  • Don't use JavaScript when HTML will do.
  • The target attribute doesn't influence assignments to window.location
David Dorward
window.location is wrong, as is target _top.It's parent.location.
Oliver
and shouldn't it be parent.location.href ?
jao
No. As I said — Don't use JavaScript when HTML will do.
David Dorward