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 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    34
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Link to page and bookmark in iframe

    Let's say I have a page called "Home." Home has an iframe that loads a page called "Framepage."

    On a different page, I'm trying to link to Home, but to a bookmark inside "Framepage."

    I tried <a href="Home.html#bookmark5"> but that doesn't work since bookmark5 is actually inside "Framepage." If I link to framepage.html#bookmark5 then that only goes to Framepage, without its parent "Home."

    Is there something like <a href="Home.html,framepage.html#bookmark5> or something?

    Thanks.
    Matt

  • #2
    SSJ
    SSJ is offline
    Regular Coder
    Join Date
    Mar 2007
    Posts
    230
    Thanks
    0
    Thanked 4 Times in 4 Posts
    You can implement it in a following manner:

    Check for main URL. If you find it like following:
    Home.html#bookmark5

    Then change the framesouce like below:
    Frampage.html#bookmark5

    Hope it helps...

  • #3
    New Coder
    Join Date
    Jun 2007
    Posts
    34
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you for your quick reply. Unfortunately, if I do that then the only page that pops up is the frame. I'd like the Home page to pop up (which contains the frame) and I want the iframe to scroll down to bookmark5.

    I'm sorry -- I think I wrote my first post in a somewhat confusing manner.

    Here it is again:

    Homepage.htm --------------------
    -----------------------
    | iFrame=framepage.htm
    | bookmark1
    | bookmark2
    | bookmark3
    -----------------------
    ----------------------------------

    From a different page, I want to link to Homepage.htm but have the iFrame scroll to a certain bookmark.

    Thank you.

  • #4
    New Coder
    Join Date
    Jun 2007
    Posts
    34
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi. Just wondering if anyone had any new thoughts?

  • #5
    New Coder
    Join Date
    Nov 2013
    Location
    UK
    Posts
    42
    Thanks
    6
    Thanked 1 Time in 1 Post

    Link to bookmark in an iFrame

    Very simple solution with HTML only !!! using variable to store the name of the bookmark, and getElementById().src for the frame to reload with a new name. Check it out at http://www.windows-addict.com in the "Coding..." area, on the second tab (select from upper-left corner from buttons menu). Video is here http://www.youtube.com/watch?v=N4iYY5N3OrQ


  •  

    Posting Permissions

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