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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2006
    Posts
    119
    Thanks
    1
    Thanked 0 Times in 0 Posts

    need help with anchors in iframes

    Hello,

    I have one page (index.html) that as an iframe inside (contents.html) and that iframe has a few anchors (#1, #2, #3...) along it.

    Now lets say i have another site not related with this one, i want to create a link that open the main page (index.html) but i wanted it to open the iframe (contents.html) on the 3# anchors instead of open on the top of the contents.html page.

    How can i do this?

    Thanks in advance

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    If the page loaded in a frame/iframe belongs to other domain, there is no way to do that as, for obvious security reasons, the cross-domain javascript relationship is restricted.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Regular Coder
    Join Date
    Jul 2006
    Posts
    119
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i gave that example because was simpler to understand the links
    everything is in the same domain, sorry

  • #4
    Regular Coder
    Join Date
    Jul 2006
    Posts
    119
    Thanks
    1
    Thanked 0 Times in 0 Posts
    theres no way to do this if everything is in the same domain?


  •  

    Posting Permissions

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