Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Anchors in iframe

    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>.

    TIA

  • #2
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Don't use target="_top"

    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.

  • #3
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •