Question

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.

Was it helpful?

Solution

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

OTHER TIPS

<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;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top