View Full Version : Anchors in iframe

09-10-2008, 02:22 PM
Another simple one for you experts:

I have an iframe at the top of a page that has an anchor link to an item further down, not in a frame. (The iframe only has the menu in it) When you click it, the entire page reloads from scratch THEN jumps to the anchor. Is there a js way to jump directly from the iframe menu link to the page anchor as if it were NOT in an iframe like it does normally without reloading the page ?

Right now I have <a href="index.html#ANCHOR" target="_top">Link</a>.


09-10-2008, 02:31 PM
When you have target="_top", you are asking the browser to load this page again.... I would try just removing this part of the <a href> and you may have what you want. If not, maybe some code would clarify what your page layout looks like and provide for a more detailed response.

09-10-2008, 06:41 PM
If I take out the target=_top it tries to load the page in the Iframe.
The page is nothing special it simply has an iframe at the top with a simple list menu for the links and one of them targets an anchor further down the page. The link works but reloads the page first. I have seen this done before but cant find an example now.

normal html

small iframe at top with menu and nothing else

rest of page normal html with anchor to jump to.