Log in

View Full Version : Javascript and HTML object reference on hard drive problem



macupryk
11-04-2007, 03:52 AM
I have the following:

<BASE HREF="http://leonardito.com/">

When I try to reference a mp3 object on my hard drive I can't.

This is in the html document.
<OBJECT
ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
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-oleobject">
<PARAM NAME="fileName"VALUE="\mymusiclyrics\hoyesadios.mp3">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">
</OBJECT>

On my hard drive it plays with

<PARAM NAME="fileName"C:\matt\music\mymusiclyrics\hoyesadios.mp3">

Say I in the html on the harddrive I put
<BASE HREF="C:\matt\music\">
How can I make it so it can play on my website dand hard drive with changing having to change the file name.

jscheuer1
11-04-2007, 04:30 AM
I just answered this question in another thread, but there I thought the problem was not being able to reference the live file. Here it looks like you are having trouble referencing the local file. For a local file, use its absolute path, ex:


<param name="fileName" value="file://localhost/C:/matt/music/mymusiclyrics/hoyesadios.mp3">