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 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2006
    Location
    Bahrain
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Let the IFRAME go to a specific part of the page

    I'm sure this is JS, or just html, but I need some info:
    I will show you the diagram:
    Any help?
    further submissions,
    Codingmasta
    ALWAYS remember to validate your code

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,387
    Thanks
    32
    Thanked 288 Times in 282 Posts
    First, The use of the name attribute in that manner is deprecated. It should be <a id="one">. Note that I changed the actual value from “1” to “one” since IDs cannot begin with a number.

    I know of one way to do what but it only works in Firefox 2 based on my tests between that, Internet Explorer 7 and Opera 9. Basically, you assign an ID to the html element of the containing document and link to the the containing document via a target attribute. Thus:

    Code:
    <a href="containing.html#one" target="HTML Element ID">
    I’m not sure if both documents actually get reloaded or not because Firefox has session storage which allows it to remember scroll positions. I do know of another way to do this, but it definitely results in both the containing and framed documents being reloaded.

    What you want to do is probably best done using a frameset document type. It seems to me that inline frames are primarily meant to be one‐way, unlike the frames of a frameset document.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

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