Forum Moderators: open
function playAudio()
{
var namae= getFileName();
document.getElementById("play1").value="http://www.example.com/ABC"+namae;
document.getElementById("play2").data="http://www.example.com/ABC"+namae;
}
function getFileName()
{
var fileName="audio1.mp3";
if (document.URL.indexOf('?')!=-1)
{
var currentURL=decodeURI(document.URL);
var index=currentURL.lastIndexOf('=');
fileName=currentURL.substring(index+1, currentURL.length);
}
return fileName;
}
<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"
codetype="application/x-oleobject" width="320" height="260"
standby="ready to play ...">
<param name="filename" id="play1"
value="" valuetype="data" />
<param name="url" value=""
valuetype="data" />
<param name="showcontrols" value="true" valuetype="data" />
<param name="autostart" value="true" valuetype="data" />
<!--[if gte IE 7]> <!--> <object type="video/x-ms-wmv" id="play2"
data="" width="320"
height="260" standby="ready to play ...">
<param name="src" value=""
valuetype="data" />
<param name="autostart" value="true" valuetype="data" />
alt : <a href="">Audio
(Video type = video/x-ms-wmv)</a> </object> <!--<![endif]--> <!--[if lt IE 7]>
alt : Demonstration (Use AcitveX control for Media Player)
<![endif]--> </object>
When I use firefox to open it, the player can work.
But if I open the file by IE, the player can't work.
Where is the mistake?
Thank you.