I feel like I am getting close with this but still having some niggling problems that perhaps some knowledgeable person on here can help out on 🙂
Here is my code so far:
<html>
<head>
<title>TEST</title>
</head>
<body>
<object id="Player"
classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"
height="160"
width="120">
<param name="uiMode" value="full">
<param name="autoStart" value="false">
<param name="enabled" value="true">
</object>
<?php
echo 'WMP Test';
?>
<script language="javascript">
{
var mycount=0;
var message;
mycount = Player.cdromcollection.count;
message="I am here";
alert(message);
if (mycount == 0)
{
message="No CD Rom Drives Available";
alert(message);
}
}
</script>
</body>
</html>
Nothing seems to happen at all, apart from the printing of the test "WMP Test" and the WMP being visible. The alert is not showing. If I take out the line:
mycount = Player.cdromcollection.count
Then the alert(message); in the following line is coming up.
There are no javascript errors so I am at a loss as to why mycount = Player.cdromcollection.count is not working. It's what is specified on the MSDN pages.