SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Resident Boozehound simontheak's Avatar
    Join Date
    Jun 2003
    Location
    _root.europe.uk.london
    Posts
    965
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Accessing Anchors in I-Frames

    Hiya,

    I'm working on a website which has an I-Frame embedded into a main HTML page. The I-Frame is one long document scrollable which will contain anchors. I'm planning on accessing these anchors from a menu on the main HTML page ... and this is where the problem is. How do I do that? A simple <HREF> tag in the main page won't work as the anchors are embedded in the I-Frame. Do I need to name the I-Frame and use that somehow?

    Any help would be really appreciated.

    Thanks alot.

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Yeah if you give the iframe a "name" and "target" that name from the links it should work:

    Code:
    <iframe src="page.html" name="frame1" scrolling="auto" width="100%" height="100%">frame1</iframe>
    Code:
    <a href="page.html#anchor1" title="A Link" target="frame1">a link</a>
    Hope it helps


Bookmarks

Posting Permissions

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