PDA

View Full Version : Refreshing Tabbed Doc Views



(ninenineteen)
06-15-2007, 11:50 PM
1) Script Title: Tabbed Document Viewer

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex3/tabdocviewer.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.

ddadmin
06-16-2007, 03:39 AM
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:


document.getElementById("tabiframe").src=selectedtablink

with:


window.frames["tabiframe"].location.replace(selectedtablink)

If that doesn't work, try this instead:


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