1. Yes, Internet Explorer has the readyState property for this. If it is set to "complete", everything should be loaded. Use it together with onReadyStateChange event to catch when a frame is done loading. I'm not sure this works in other browsers though. If not, you could perhaps use the onLoad event of the body tag to call a JavaScript function in the tabs frame.
2. I'm not sure about this. A regular div tag doesn't float outside the frame so it can't be made to show up no matter which frame is visible. The words "modular windows" comes up in my head but I've never used that myself... would probably get killed by popup blockers anyway.
Maybe you could place the "loading div" in the tabs frame instead?
I'm thinking that a small
loadingScript.js file could be called from each one of your pages that load in the frames.
In the .js file, you set
document.body.onload=doneLoading and create a function called
doneLoading. In that function you use
linkList=document.getElementsByTagName('a') to get a collection of all the links on the page. You give each link an onClick event by looping through them and doing [I]linkList
.onclick=startLoading.
After that (still in the
doneLoading function) you reference the tabs frame using
window.parent.frames[0].getElementById('loadingDiv').style.display="none".
End of that function. Now to the
startLoading function. Here you do the opposite:
window.parent.frames[0].document.getElementById('loadingDiv').style.displ ay="block" to show the "loading div".
Add <script src="
loadingScript.js"></script> to the pages that will be loaded into the frames. Also add a div tag with the id "loadingDiv" to the tabs frame.
Now, each link on your pages should automatically be given an event handler which pops up the loading div when clicked. And as soon as the new page is done loading, the div should disappear again thanks to the onload event handler.
Hope I didn't confuse you
