Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calling IFRAME Experts

    I have an IFRAME within my web page, who's SRC is another page on my company's intranet. How can I create a "Back" link (like the browser back button) that only takes the IFRAME back and not the whole page.

    Thanks in advance,

    Ade

  2. #2
    navir
    Guest

    Re: Calling IFRAME Experts

    Hi, Ade:

    I think your question is really how to create a hyperlink that returns to the previous page rather than an absolute URL. To do this use JavaScript's history object, with its back() method; or go(), or forward(). (Using IE's shortcut menu -- "Back" --, or its back button, work without using JavaScript.)

    I created a small test system with three files as follows:

    IFRAME.HTM

    <html>
    <head>
    <title>iframe</title>
    </head>
    <body>

    <iframe src="fromiframe.htm">iframe content</iframe>

    </body>
    </html>

    FROMIFRAME.HTM

    <html>
    <head>
    <title>from iframe</title>
    </head>
    <body>




    IFRAME SRC</p>

    iframe link

    </body>
    </html>

    IFRAMELINK.HTM

    <html>
    <head>
    <title>iframe link</title>
    </head>
    <body>

    back to iframe

    </body>
    </html>

    Try this sytem out and let me know if it answers your question.

    Regards,
    Ivan

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling IFRAME Experts

    Certainly does - many thanks.

    I was aware of javascript objectback(), but I thought the object would have to refer to the IFRAME object, rather than just the History object.

    The solution was far simpler than I thought!

    Many thanks,

    Ade

Posting Permissions

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