Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove frames button..?

Status
Not open for further replies.

xscape

Programmer
Apr 18, 2001
144
GB
Hi,

I've written a small ASP script where all links that link to sites outside of mine go through my ASP script (external.asp) and the script then takes the URL and puts it into a lower frame whilst in a top frame I have my website logo and links to some of my pages. Simple so far.

The problem:
1) I want to put a small link on my page that appears in the top frame that allows the user to remove the frame. I thought Javascript is best for this. Any ideas or scripts your know of?

2) The second probem is that when you click on a link in the top frame to browse my website (such as go back to the main page etc) I need it also to remove the frame so my site appears as normal with no top frame. I guessed this would work in a similar way as above but I'm not sure.

Any help would be brilliant!

Cheers!! :)
 
1) <a href=the_url target=top>remove the frame and go to the_url</a>
2) same as above
 
you'll have to check (== read the doc!) but the exact syntax is more like
either target=&quot;_top&quot;
or <a href=&quot;javascript:top.location=theurl&quot;>
 
Hey thanks!

I thought it might be that easy, but couldn't figure it out. Works a dream! I just added target=&quot;_top&quot; into the <a href....> tag and got it. Brill. Cheers!

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top