I have the following page
http://www.inwebico.com/MediaPlayer.htm that plays a video. I have a hidden layer that is exposed after the user clicks on the "show details" link. The problem I'm experiencing is that once a user clicks on the "Show Details" link while the video is playing, the video stops....
Is there something wrong with the JavaScript that is causing the playback to be interrupted? -or- Is my approach totally wrong and I should consider another way of doing this?
^^====================== CODE STARTS ==========================
====^^
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
// --========================
==========
==========
=====
//-- DISPLAY LAYER
// --========================
==========
==========
=====
function show(object) {
if (document.layers && document.layers[object] != null)
document.layers[object].vi
sibility = 'visible';
else if (document.all) {
document.all[object].style
.visibilit
y = 'visible';
}
}
function hide(object) {
if (document.layers && document.layers[object] != null)
document.layers[object].vi
sibility = 'hidden';
else if (document.all)
document.all[object].style
.visibilit
y = 'hidden';
}
function Toggle(item) {
obj=document.getElementByI
d(item);
visible=(obj.style.display
!="none")
if (visible) {
obj.style.display="none";
} else {
obj.style.display="block";
}
}
//-->
</script>
</head>
<body>
<table width="500">
<tr>
<td valign="top">
<div align="center">
<OBJECT ID="MediaPlayer1"
CLASSID="CLSID:22d6f312-b0
f6-11d0-94
ab-0080c74
c7e95"
CODEBASE="
http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft® Windows® Media Player components..."
type="application/x-oleobj
ect">
<PARAM NAME="FileName" VALUE="ParksBonifay-Double
HalfCabRol
l-dpcFilms
.wmv">
<PARAM NAME="AutoStart" VALUE="1">
<PARAM NAME="ShowControls" VALUE="1">
<PARAM NAME="ShowDisplay" VALUE="0">
<PARAM NAME="ShowStatusBar" VALUE="1">
<PARAM NAME="AutoSize" VALUE="1">
<PARAM NAME="AnimationAtStart" VALUE="False">
</OBJECT>
</div></td>
<tr valign="top">
<td><div align="center"><a href='javascript:Toggle("d
ivDetails"
);'><br>
SHOW DETAILS</a></div></td>
</tr>
<tr valign="top">
<!-- This layer is hidden and will be displayed after clicking on the "Show Details" link -->
<td>
<div id="divDetails" style="display:none;">More
Details More Details More Details More
Details More Details More Details More Details More Details More Details More Details
More Details More Details More Details </div></td>
</tr>
</table>
</html>
Start Free Trial