My HTML page is having the following code which displays the Player. The following code is working fine when I open the HTML file directly from browser.
If I deploy the same HTML file in server, the following code is not working. Pls help me in this.
<iframe id='iplayer' name='iplayer' src='MyJsPlayer.htm' style="vertical-align:top; width:200px; height:22px; scrolling:no; border:0; frameborder:0">
Your browser does not support iFrame.
</iframe>
MyJsPlayer.HTML
<html>
<body style=margin:3px; bgcolor=#dddddd>
<noscript>
<div class="noscript" style="margin:24px;">
<img src="noscript.gif" alt="In order to access this site you need to enable JavaScript !" />
</div>
</noscript>
<script type="text/javascript" language="JavaScript">
<!--
var sUsrAgt = navigator.userAgent;
var sSearch = self.location.search;
var sNameLC = sSearch.toLowerCase().substring(1);
var nameLen = sNameLC.length;
var sType = 'unknown';
if (sNameLC.lastIndexOf('.au') >nameLen-6) sType="audio/basic";
if (sNameLC.lastIndexOf('.ra') >nameLen-6) sType="audio/x-pn-realaudio";
if (sNameLC.lastIndexOf('.rm') >nameLen-6) sType="audio/x-pn-realaudio";
if (sNameLC.lastIndexOf('.mid')>nameLen-6) sType="audio/midi";
if (sNameLC.lastIndexOf('.mp3')>nameLen-6) sType="audio/mpeg";
if (sNameLC.lastIndexOf('.wav')>nameLen-6) sType="audio/wav";
if (sSearch.length<3) document.bgColor="white";
else if (sNameLC=='stop' ) document.writeln('<center><small>Audio stopped.</small></center>');
else if (sType=='unknown') document.writeln('<center><small>Unknown audio file type.</small></center>');
else
{ // WRITE HTML TAGS FOR AUDIO PLAYBACK
if (sUsrAgt.indexOf('Opera')!=-1||sUsrAgt.indexOf('MSIE')!=-1)
document.writeln('<bgsound volume=-1000 LOOP=1 src="'+encodeURI(sSearch.substring(1,99))+'">');
else document.writeln('<object width=194 height=16 data="'+encodeURI(sSearch.substring(1,99))+'" type="'+sType+'"></object>');
}
-->
</script>
</body>
</html>