...

View Full Version : quicktime div innerHTML embed object - why invisible after reload?



HotZat
11-02-2006, 11:55 PM
Hi coders,
I have a page that chooses a video from a list using a button onclick event, writes the avi into object and embed quicktime as a string, and reloads it into a DIV element in the body.
The Problem is that after the avi is completely loaded, if I select the same video again, there is no image, only sound. Not even the controls or the quicktime logo or anything. In other words, as long as it says, "downloading WHATEVER.avi" in the status bar, it plays fine.
Page is here if interested: www.hotzat.com/media.aspx
It works in firefox but not ie6. I found this ie6 bug at this site:
http://blog.deconcept.com/2006/05/1...t-innerhtml-ie/
That is what I am banging my head against now.
Any ideas?

This is in the head:
<script>
var video = new Array();
video[0]="powerslave.jpg";
video[1]="AJ1.avi";
video[2]="AJ2.avi";
video[3]="AJ3.avi";

var Title = new Array();
Title[0]="Iron Maiden&#39s Power Slave.";
Title[1]="Aggie n Jason 1";
Title[2]="Aggie n Jason 2";
Title[3]="Aggie n Jason 3";

function changeDiv(aaa)
{
StrBOXX='<p>This is ' + Title[aaa] + '.</p>'
StrBOXX+='<form>'
if (aaa==0)
{StrBOXX+='<p><img src="' + video[aaa] + '" border="2"></p>'}
else
{StrBOXX+='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="255" width="320" id="OCplayer" align="left"></p>'
StrBOXX+=' <param name="autoplay" value="true"></p>'
StrBOXX+=' <param name="controller" value="true"></p>'
StrBOXX+=' <param name="src" value="' + video[aaa] + '"></p>'
StrBOXX+=' <embed id="OCplayer" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" src="' + video[aaa] + '" height="255" width="320" align="left" autoplay="true" controller="true"></embed></p>'
StrBOXX+='</object></p><br><br><br><br><br><br><br><br><br><br><br><br><br>'}
StrBOXX+='</form>'
document.getElementById('BOXX').innerHTML=StrBOXX
}
</script>

This is in the Body:

<p>Choices:<br>
<input value="Stop" type="button" onclick="changeDiv(0)">
<input value="AJ1" type="button" onclick="changeDiv(1)">
<input value="AJ2" type="button" onclick="changeDiv(2)">
<input value="AJ3" type="button" onclick="changeDiv(3)">

</p>

<div id="BOXX">
<p>Choose.</p>
<form>
<p><img src="powerslave.jpg" border="2"></p>
</form>
</div>

Thank you very much

iota
11-03-2006, 04:46 PM
so, prevent users from selecting/playing the same video file again.
Once pressed, do the button disabled.

HotZat
11-04-2006, 08:28 PM
so, prevent users from selecting/playing the same video file again.
Once pressed, do the button disabled.

that would solve the problem...
just like turning up the car radio fixes the grinding noise in the engine.

next!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum