Friday, June 16, 2006

[itsdifferent] A Javascript query (embed sound. firefox Problem)

 
Hi All,
 
 
   I need a help, Please reply me if any one know.

I want to set SRC attribute of <embed> tag with a javascript function, it is working fien In IE but not working for fire Fox. And Jump to a position is not working.
I Also used <BGSOUND id="BGSOUND_ID" LOOP=1 SRC="aadat.mp3"> And try to stop and Paly and set src with javascript function. it aslo work firn with IE But not in FireFox.
 
 
Here is the HTML Code
 
-----------------------------------------------------------------------
 
<html>
<head>
<title>Video Test</title>
<script language="javascript">
function Jump(position, fileName) {
         if (navigator.userAgent.indexOf("IE") > -1) {
        objMediaPlayer.FileName = fileName;
        objMediaPlayer.CurrentPosition = position;
        objMediaPlayer.Play();
} else {
         //alert (position);
         document.objMediaPlayer.SetCurrentPosition(position);
}
}
</script>
</head>
<body>
<OBJECT ID="objMediaPlayer" WIDTH=320 HEIGHT=240 CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="aadat.mp3">
<EMBED TYPE="application/x-mplayer2" SRC="aadat.mp3" NAME="objMediaPlayer" WIDTH=320 currentposition=30 HEIGHT=240  enablejavascript="true">
</EMBED>
</OBJECT>

<FORM>
    <INPUT TYPE=BUTTON NAME="ForwardButton"  VALUE="Jump"  ONCLICK="Jump(2,'18$18.mp3')"/>
</FORM>
</body>
 
-----------------------------------------------------------------------
 
    Thanks:
 
Regards:
Vishal Shukla.


Yahoo! Sports Fantasy Football ’06 - Go with the leader. Start your league today!

__._,_.___
Note: This Group is not a Job Searching Group, so please co-operate and dont transfer any kind of job related material across this Group.AnyOne doing so can be banned from the Group
Thanx , Group Co-Ordinators
.

__,_._,___

No comments: