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 Coder
    Join Date
    Oct 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Link to <a name="x"> from outside iframe

    could be an easy one - done a search and found nothing.

    I have a <a name="x"> on my parent/top level page

    On that I have an iframe, within the iframe I have a link with <a href="#x"> and want it to jump to "x" on the parent/top level page.

    How to?

    Thanks in advance

    Death = $Mill

  • #2
    PGG
    PGG is offline
    New to the CF scene
    Join Date
    May 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Iframe's link to a parent's anchor

    Hey mate:
    I am not the most expert but you can try this solution,
    write the link in Iframe like this:

    <a href="javascript:;" onclick="parent.location.hash='x';return false;">link to x</a>

    for me works perfectly, good luck!!!

    PGG

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts

    No need for javascript

    <a href="URLofTopPage#x" target="_top">Link</a>


  •  

    Posting Permissions

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