Hi,
I am having a real problem getting this to work in firefox. It works great in IE, but firefox doesn’t want to even recognize my code.
Basically, I have an object, param and embed tags for a windows media player that is being sent to an div via innerhtml. All I really want to do it send a different wmv files to the player when the user clicks on a link. I am using an XML file to create the links, and there is an onclick event that triggers a javascript event. In this event I am sending the innerhtml with a new Object and Embed tags with the src/url of that wmv.
I tried to send it via the following code, but it did not see this either. It all works in IE, just not in firefox.
[code]
parent.document.getElementById(‘videoembed’).url= source;
This is the procedure that is sending the innerhtml code.
[code]
function playvideo(source) {
//parent.document.getElementById(‘videoembed’).url= source;
var b = ‘<OBJECT id=”videoembed2″ name=”videoembed2″ width=”500″ height=”445″ classid=”CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6″ type=”application/x-oleobject”><PARAM NAME=”URL” VALUE=”‘ + source + ‘”></PARAM><PARAM NAME=”enabled” VALUE=”True”></PARAM><PARAM NAME=”AutoStart” VALUE=”True”></PARAM><PARAM name=”PlayCount” value=”3″></PARAM><PARAM name=”Volume” value=”30″></PARAM><PARAM NAME=”balance” VALUE=”0″></PARAM><PARAM NAME=”Rate” VALUE=”1.0″></PARAM><PARAM NAME=”Mute” VALUE=”False”></PARAM><PARAM NAME=”fullScreen” VALUE=”False”></PARAM><PARAM name=”uiMode” value=”full”></PARAM><PARAM NAME=”EnableFullScreenControls” VALUE=”True”></PARAM><PARAM NAME=”BufferingTime” VALUE=”5″></PARAM><PARAM NAME=”AllowChangeDisplaySize” VALUE=”False”></PARAM><PARAM NAME=”AutoRewind” VALUE=”True”></PARAM><PARAM NAME=”BaseURL” VALUE=””></PARAM><PARAM NAME=”stretchToFit” VALUE=”True”></PARAM><EMBED type=”application/x-mplayer2″ pluginspage=”http://microsoft.com/windows/mediaplayer/en/download/” id=”videoembed” name=”videoembed” displaysize=”4″ autosize=”-1″ bgcolor=”darkblue” showcontrols=”true” showtracker=”-1″ showdisplay=”0″ showstatusbar=”-1″ videoborder3d=”-1″ width=”500″ height=”445″ autostart=”false” designtimesp=”5311″ loop=”false” src=”‘ + source + ‘”></EMBED></OBJECT>’;
alert(b);
parent.document.getElementById(‘divvideo’).innerHTML = b;
}
When I run the page in IE, the video comes up just fine, when I run the code in Firefox, the code alerts with an empty alert box, and nothing happens. If I put some text before the tags, I see the text, but nothing else, and the div shows these word, but nothing else happens and the video player does not appear.
I do not know what I am doing wrong. Please HELP!!!
Thanks!!!