Works on my computer, not on my site

W

WilliamWMeyer

I have a site with sound files. Clicking the link causes the sound file to
"play" when the browser the html file open from the c:\ drive on my
computer. When I put the html file on my site, and open it from my site with
my browser it DOESN'T play. (On IE, page not found; Mozilla, name of
website.)

Where does one begin to analyze this problem. Behavior is same on different
computers, I don't think it's firewall-related, because it worked as
expected on an earlier version of the site.

Any help appreciated,
WilliamW
 
S

sagejoshua

I have a site with sound files. Clicking the link causes the sound file to
"play" when the browser the html file open from the c:\ drive on my
computer. When I put the html file on my site, and open it from my site with
my browser it DOESN'T play. (On IE, page not found; Mozilla, name of
website.)

You need to make sure you upload the file to your web server, and
place it in the correct folder. For example, if the the link is <a
href='mp3/1.mp3'>, make sure you put the file in the mp3 folder.

Josh
 
W

WilliamWMeyer

Thanks, I think all the folder/pointer issues are okay, but I'll double
check.
 
A

Andy Dingley

When I put the html file on my site, and open it from my site with
my browser it DOESN'T play.

Tell us the URL - we're not psychic.

Chances are that you have a URL of "C:\foo\bar\bat.noise" When you
open this locally the browser applies the default file: protocol and
retrieves it from the filesystem. When you do it remotely from the
server the page is retrieve by http and so the default protocol for the
sound link is http:C:\foo\bar\bat.noise which is of course invalid.

Besides which, you need to upload the sound files to the server and give
them sensible URLs if anyone other than you is expected to be able to
play them.
 
W

WilliamWMeyer

Thanks for the response, Andy.

The URL is www.songsthatsoundlikeothersongs.com

The html files are in the site's root folder on the server, the sound files
are in a subfolder of the root called "\clips"

In the code these are referenced "relative"-ly: <a
href="..\clips\DontLetGo-Hearbreaker.MP3">play soundalike clip</a>

Like I said, I had it working as expected in an earlier version. (That
version had other problems -- hand-coded only, but only worked properly in
IE. Now I'm using nvu, which makes it work also in Firefox [who knows about
others]. Why the cross-browser thing works now when it didn't before, I
don't understand.)

--Willliam
 
B

bernhard

WilliamWMeyer schrieb:

The URL is www.songsthatsoundlikeothersongs.com

The html files are in the site's root folder on the server, the sound files
are in a subfolder of the root called "\clips"

In the code these are referenced "relative"-ly: <a
href="..\clips\DontLetGo-Hearbreaker.MP3">play soundalike clip</a>

Like I said, I had it working as expected in an earlier version. (That
version had other problems -- hand-coded only, but only worked properly in
IE. Now I'm using nvu, which makes it work also in Firefox [who knows about
others]. Why the cross-browser thing works now when it didn't before, I
don't understand.)

using forward slashes will help
href="../clips/DontLetGo-Hearbreaker.MP3">play soundalike clip</a>
 
M

Martin

WilliamWMeyer said:
I have a site with sound files. Clicking the link causes the sound file to
"play" when the browser the html file open from the c:\ drive on my
computer. When I put the html file on my site, and open it from my site with
my browser it DOESN'T play. (On IE, page not found; Mozilla, name of
website.)

Where does one begin to analyze this problem. Behavior is same on different
computers, I don't think it's firewall-related, because it worked as
expected on an earlier version of the site.
I had this problem with movie files once. I think you need to register the
file extensions on the server so the server knows how to handle them.
 
J

JDS

Thanks, I think all the folder/pointer issues are okay, but I'll double
check.

They are not. Look what happens to the URL for one of the songs when I
click on it:

http://www.songsthatsoundlikeothersongs.com/..\clips\FastAsYou-BalladOfJohnAndYoko.MP3


What is that? The %5C's throughout the thing, the /.. after the server
name...

1) A URL does *NOT* use backslashes!! URLs use FORWARD slashes.

When I manually change the backslashes to forward slashes I am able to
download the clip.

This is a classic example of a MS fubar + misunderstanding on the part of
the coder (you). But it can be corrected. Just change all the
backslashes to forward slashes.
 
W

WilliamWMeyer

Thanks, JDS and others.

Sounds like it's probably the slashes (argh!). The %5C came in when putting
the <body> elements into the nvu-provided head elements. I'm at work right
now and can't test it. What threw me off looking at the slashes was that the
backslashes used to work. (Please don't flame me for not knowing or caring
about which way the slashes are supposed to go.)

Best,
William
 
J

JDS

What threw me off looking at the slashes was that the
backslashes used to work. (Please don't flame me for not knowing or caring
about which way the slashes are supposed to go.)

Well, if you are trying to do something with a computer, in general it is
a good idea to know and/or care about what the computer needs. Computers
are rather stupid and it is up to the human to know what is supposed to be
inputed.
 
W

WilliamWMeyer

Yes, I understand.

It's just that the backslashes worked on an earlier version. I'm sure at the
time there were far gnarlier ambiguities that I patted myself on the back
for vanquishing. My self-satisfaction was my downfall. It didn't occur to me
that MS via IE was compensating for my ignorance, thus postponing the
painful object lesson it was apparently my destiny to learn -- about the
true importance of the direction of the slash -- until this time of more
leisurely reflection. And for that, at least, I am grateful.

Again, your help is much appreciated.

--William
 
B

Bob Long

In
WilliamWMeyer said:
I have a site with sound files. Clicking the link causes the sound
file to "play" when the browser the html file open from the c:\ drive
on my computer. When I put the html file on my site, and open it from
my site with my browser it DOESN'T play. (On IE, page not found;
Mozilla, name of website.)

Where does one begin to analyze this problem. Behavior is same on
different computers, I don't think it's firewall-related, because it
worked as expected on an earlier version of the site.

What's your Web site address? That will help people check what is going on.
Are the links to the sound files correct? Perhaps the case is wrong; perhaps
they are trying to point to somwhere on your PC.

Bob Long
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top