Show table until object is downloaded (how do I)

M

Mike

Hey, I have a page that is showing QTVR (.mov, which Javascript
doesn't treat much differently than a large image). Since these are a
little slow to download, I'm trying to figure out a good way to show a
table in it's place until it's totally downloaded.

I'm currently using the following code, but it immediately overwrites
the table before the .mov is downloaded. This makes the page a little
confusing for about 15 seconds. Ideally, the table would be shown
until the .mov is completely ready to play. Then, once someone clicks
on a different movie, the "please wait" table would be shown again
until the second movie is downloaded, and so on.

Here's the original code, simplified for posting:

function viewTour(source) {
document.getElementById("tour").innerHTML = "<embed src='" + source +
".mov' height='240' width='320' border='0' controller='true'>"
}

<body onLoad="viewTour('0')">

<div id="tour">
<table width="320" height="240" border="1"><tr><td>
Please wait...
</td></tr></table>
</div>

<a href="#" onClick="viewTour('0'); return false">
Click to see first movie
</a>

<a href="#" onClick="viewTour('1'); return false">
Click to see second movie
</a>

<a href="#" onClick="viewTour('2'); return false">
Click to see third movie
</a>


Any suggestions would be greatly appreciated! TIA,

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top