Jump to content

Fun with _top in <a> tags


Recommended Posts

Okay.Doing a site redesign, as the old one was... well, better than the original by far, but still shabby. I write straight HTML and CSS.I always put my menus in an iframe - that way I don't have to change every single page (it's a big site) when I add something new.The new design has only that one iframe. The rest of the layout is part of the parent.Basically, all I'm trying to do is to get links from the menu to open in the whole window - using _top. I've done this before, very successfully, on the old site.Firefox is insisting on opening menu links in a new window. I've tried _top and _parent, neither has worked. IE will do the deed happily.The irony is that Firefox will open the same style of link from the old design (which is still on the server) in exactly the way I want it to.I've checked for code mistakes. In fact, I've put the two pieces of code side-by-side. Could someone please tell me why

<a href="/1024x768/main.htm" target="_top">1024x768</a>

works, but

<a href="kotor_fanfic.html" target="_top">Fanfiction</a>

doesn't?And yes, the page exists, and yes, I've tried Ctrl+F5 (reload without cache) :)For reference, the old site is still up here and the testing version of the new site is here. The link I used from the old site is part of the 'enter' banner.

Link to post
Share on other sites

I dont know how to do that, I never have messed with iframes my self. But I do suggest you look into using PHP instead of iframes. It works the same and gives a nicer presentation:nav.php- link<br> link<br> link<br>file.php-<?php include("nav.php"); ?>content<br>content<br>content<br>what the viewer will get- link<br> link<br> link<br>content<br>content<br>content<br>simple =D

Link to post
Share on other sites

That probably would work better... however, I only have a limited amount of space for PHP/CGI/remote scripts. Converting the entire site (some 130 pages) into PHP would require me to host them all on the PHP server, and eat up a lot of space.I may move hosts soon, though... if I do, I'll bear that in mind :)

Link to post
Share on other sites
Have you fixed this one yet? I couldn't find the exact thing you were talking about on your site - if you could point to a direct page and text, i'll have a look :)

No, I haven't.On the older site (here), the banners on the entrance pages are iframes. When a text link inside them is clicked, they open in the whoel window, using _top. This works perfectly.On the new site (here), if you go to 'SW:KotOR' on the menu and then click 'Fanfiction', the page opens in a new window - or at least, it does for me. It's also using _top, however, and should open in the parent window, as the older site's links do.KotOR fanfiction is the only menu link that's currently working. Sorry, I should have mentioned that :)
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...