Hello,
i have a code that doesn't work in mozilla but works in IE, could someone find what is wrong with it?
Thank you
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1252">
<script language=JavaScript>
var tStart = null;
function UpdateTimer() {
if(!tStart)
{
tStart = new Date();
document.MediaPlayer.play();
}
var tDate = new Date();
var tDiff = tDate.getTime() - tStart.getTime();
if (tDiff > 0)
{
document.MediaPlayer.stop();
return;
}
timerID = setTimeout("UpdateTimer()", 1);
}
</script>
</head>
<body onload="UpdateTimer()">
<OBJECT ID="MediaPlayer"
WIDTH="160" HEIGHT="130"
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="_a.wmv">
<PARAM NAME="autostart" VALUE="false">
<PARAM NAME="showcontrols" VALUE="false">
<embed ID="MediaPlayer"
TYPE="application/x-mplayer2"
SRC="_a.wmv"
WIDTH="160" HEIGHT="130"
AUTOSTART="0" SHOWCONTROLS="0">
</embed>
</OBJECT>
<br>
<IMG SRC="rodyti1.bmp" NAME="but"
border=0
onMouseOver="document.but.src='rodyti2.bmp'"
onMouseOut="document.but.src='rodyti1.bmp'"
onclick="document.MediaPlayer.play()">
</body>
</html>
i have a code that doesn't work in mozilla but works in IE, could someone find what is wrong with it?
Thank you
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1252">
<script language=JavaScript>
var tStart = null;
function UpdateTimer() {
if(!tStart)
{
tStart = new Date();
document.MediaPlayer.play();
}
var tDate = new Date();
var tDiff = tDate.getTime() - tStart.getTime();
if (tDiff > 0)
{
document.MediaPlayer.stop();
return;
}
timerID = setTimeout("UpdateTimer()", 1);
}
</script>
</head>
<body onload="UpdateTimer()">
<OBJECT ID="MediaPlayer"
WIDTH="160" HEIGHT="130"
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="_a.wmv">
<PARAM NAME="autostart" VALUE="false">
<PARAM NAME="showcontrols" VALUE="false">
<embed ID="MediaPlayer"
TYPE="application/x-mplayer2"
SRC="_a.wmv"
WIDTH="160" HEIGHT="130"
AUTOSTART="0" SHOWCONTROLS="0">
</embed>
</OBJECT>
<br>
<IMG SRC="rodyti1.bmp" NAME="but"
border=0
onMouseOver="document.but.src='rodyti2.bmp'"
onMouseOut="document.but.src='rodyti1.bmp'"
onclick="document.MediaPlayer.play()">
</body>
</html>