murphy79 wrote:Anyone know how to update the filename in the <embed> tag using javascript?
I have links to different videos in a page, and wish to update the url trough a javascript.
I have tried using the document.getElementById method with no luck.
I have a test player on this URL:
http://www.cikmedia.com/test/testing_player.htmlAny new hints on my mac issue is very welcome.
I'm greatful for all help so far.
I would suggest you rewrite the entire [tt]<div>[/tt] or [tt]<span>[/tt] tag enclosing [tt]<object>...<embed></object>[/tt].
e.g.
in HTML:
somewhere
[tt]<div id="movieBox" name="movieBox"><img src="
path to image place holder">
</div>[/tt]
[tt]
movieString = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="270" width="480"><param name="src" value="' +
movieURL + '"><embed height="270" pluginspage="http://www.apple.com/quicktime/download/" src="' +
movieURL + '" type="video/quicktime" width="480" controller="false" autoplay="true" loop="false" bgcolor="#000000"></object>''
if(typeof(document.getElementById) == 'function') {
document.getElementById(divID).innerHTML = movieString;
} else if( browser=="ie4" ) // for MSIE 4 only
{
document.all["movieBox"].innerHTML = movieString;
}[/tt]
UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2