G
gsauns
I have a Windows Media Player control embedded in my page. This is the
code I use to get it to play:
function setPlayerURL()
{
player = document.getElementById("wmpWindow");
myURL =
document.getElementById("pathStore").getAttribute("value");
player.URL = myURL;
alert(player.URL);
}
I used the alert to debug. I could not get it to work at all, until I
realized that the control DOES play the video WHILE the alert is open.
As soon as you click OK on the alert, the video stops and cannot be
played again.
I used another function to determine what the URL of the player is at
the moment that you click another button. That alert comes up blank.
This is my code for the player:
<object id="wmpWindow" width="400" height="300"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject" >
<param name="uiMode" value="full" />
<param name="AutoStart" value="true" />
</object>
It seems like after the Javascript function finishes, the page
refreshes and set the URL to "".
Why is this happening?
code I use to get it to play:
function setPlayerURL()
{
player = document.getElementById("wmpWindow");
myURL =
document.getElementById("pathStore").getAttribute("value");
player.URL = myURL;
alert(player.URL);
}
I used the alert to debug. I could not get it to work at all, until I
realized that the control DOES play the video WHILE the alert is open.
As soon as you click OK on the alert, the video stops and cannot be
played again.
I used another function to determine what the URL of the player is at
the moment that you click another button. That alert comes up blank.
This is my code for the player:
<object id="wmpWindow" width="400" height="300"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject" >
<param name="uiMode" value="full" />
<param name="AutoStart" value="true" />
</object>
It seems like after the Javascript function finishes, the page
refreshes and set the URL to "".
Why is this happening?