JavaScript help!

Status
Not open for further replies.

disturbedart

Member
Messages
474
Reaction score
1
Points
18
Im trying to make a javascript working with an embedding windows media player, I have tested it on a javascript website w3schools Tryit Editor and this code works with it! Shows the player and everything even streams. Just can't get it to work when i upload it to x10hosting. Im also trying to make it external so i can make it available to overs using an external code.

Here is the code im using
Code:
<script type="text/javascript">
document.writeln('              <OBJECT ID="MediaPlayer" WIDTH=239 HEIGHT=39\n        CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"\n        STANDBY="Loading Windows Media Player components..."\n        TYPE="application\/x-oleobject">\n\n<param name="fileName" value="http:\/\/64.191.50.163:8002">\n        <param name="animationatStart" value="true">\n        <param name="transparentatStart" value="true">\n\n        <param name="autoStart" value="true">\n        <param name="showControls" value="true">\n        <param name="Volume" value="-300">\n\n<embed type="application\/x-mplayer2" pluginspage="http:\/\/www.microsoft.com\/Windows\/MediaPlayer\/" src="http:\/\/64.191.50.163:8002" name="MediaPlayer1" width=239 height=39 autostart=1 showcontrols=1 volume=-300>\n        <\/OBJECT>');
 </script>

When im using it to be external im using the following
Code:
<script src="http://www.pulseempire.x10hosting.com/player/player.js"></script>

Please can someone work this out for me.
I can's see why i can't get it to show on my other page.

The page im testing it on is here.
www.pulseempire.x10hosting.com/player/test.html
www.pulseempire.x10hosting.com/player/player.js

Can't get the player to show when linking the two together.
I want the javascript to show on the test.html page.

Thanks in advance.
Disturbedart
 

disturbedart

Member
Messages
474
Reaction score
1
Points
18
*Bump* I still need help on this please.
Thank you

If someone can give me a full working copy for me.
I will donate 150credits to them.

Regards,
Diseased Database.
 

sunils

New Member
Messages
2,266
Reaction score
0
Points
0
Hi,

Just saw ur query, let me try it.

Sunil Sankar
------------------------
http://www.sunils.co.cc
http://sunilstech.blogspot.com/
Edit:
Hi

Just found the solution for your problem
The java script is

Code:
document.writeln('<OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=39 CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"  STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"><PARAM name="autoStart" value="True"><PARAM name="filename" value="enter your url address to the file along with its name and extension "><EMBED TYPE="application/x-mplayer2" SRC="enter your url address to the file along with its name and extension " NAME="MediaPlayer" WIDTH=320    HEIGHT=39></EMBED></OBJECT>');

and in the test page

Code:
<script language="javascript" src="player.js" type="text/javascript"></script>

use this..

Note:-

In the filename param value and src value where i have specified
"enter your url address to the file along with its name and extension"

do as follows. if your song file name is test.mp3, and it is located in www.mysite.com/sampledir

then the value will be

http://www.mysite.com/sampledir/test.mp3

Hope this is usefull and solved your problem

In case of query please update this thread.

Sunil Sankar
------------------------
http://www.sunils.co.cc
http://sunilstech.blogspot.com/
Edit:
Hi

Just found the solution for your problem
The java script is

Code:
document.writeln('<OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=39 CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"  STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"><PARAM name="autoStart" value="True"><PARAM name="filename" value="enter your url address to the file along with its name and extension "><EMBED TYPE="application/x-mplayer2" SRC="enter your url address to the file along with its name and extension " NAME="MediaPlayer" WIDTH=320    HEIGHT=39></EMBED></OBJECT>');

and in the test page

Code:
<script language="javascript" src="player.js" type="text/javascript"></script>

use this..

Note:-

In the filename param value and src value where i have specified
"enter your url address to the file along with its name and extension"

do as follows. if your song file name is test.mp3, and it is located in www.mysite.com/sampledir

then the value will be

http://www.mysite.com/sampledir/test.mp3

Hope this is usefull and solved your problem

In case of query please update this thread.

Sunil Sankar
------------------------
http://www.sunils.co.cc
http://sunilstech.blogspot.com/
 
Last edited:
Status
Not open for further replies.
Top