Results 1 to 2 of 2

Thread: Refreshing Tabbed Doc Views

  1. #1
    Join Date
    Jun 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Refreshing Tabbed Doc Views

    1) Script Title: Tabbed Document Viewer

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...bdocviewer.htm

    3) Describe problem:
    I've implemented this code on one of my pages. However, when new content is available on the childframes, a user must refresh the frame to view the new content. Otherwise, the old version of the webpage is delivered to the childframe.

    Any thoughts on automatic refreshing of the childframe pages?

    The refresh issue has been most noticed in FireFox 1.5.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    With iframes different browsers may cache the contents in slightly different way. Anyway, try this to minimize the chances of caching. First, find the line:

    <iframe id="tabiframe" name="tabiframe" src="http://www.google.com" width="98&#37;" height="350px"></iframe>

    The code in red is new, and should be added in. Then for the script itself, replace the line:

    Code:
    document.getElementById("tabiframe").src=selectedtablink
    with:

    Code:
    window.frames["tabiframe"].location.replace(selectedtablink)
    If that doesn't work, try this instead:

    Code:
    window.frames["tabiframe"].location.replace(selectedtablink)
    try{
    window.frames["tabiframe"].location.reloadz(true)
    }
    catch(e){}

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
  •