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
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