This is bizarre html behaviour...

P

Pascal Herczog

I've got a simple html file (fileA), with a table in which each cell
contains a hyperlink to a standard text (.txt) file.

The page consists of 2 frames, with fileA in the top frame. In the <head> of
fileA is

<base target="bottom">

to direct the result of clicking on each hyperlink to the bottom frame.

On my WinXP desktop, whether loading this from my C: drive, or from my ISP
webspace, it works fine for every text file within IE.

But what I'm finding on my Win2k laptop is that some text files do indeed
get printed to the bottom frame, but others cause the IE browser to ask
whether to open the file, download (save) it or cancel. I can see absolutely
no difference in the way in which each .txt file is defined in the
hyperlink. I can only assume that somehow, the content of a .txt file cause
this behaviour. But WHY? (and can I force it to treat it as normal text?)

Cheers,
Pascal
 
T

Toby Inkster

Pascal said:
I can only assume that somehow, the content of a .txt file cause
this behaviour. But WHY? (and can I force it to treat it as normal text?)

More likely it's the Content-Type HTTP header.
 
P

Pascal Herczog

Toby Inkster said:
More likely it's the Content-Type HTTP header.

Not sure I understand, as the text files are just plain text, and don't
contain any specific html code.

Pascal
 
T

Toby Inkster

Pascal said:
Not sure I understand, as the text files are just plain text, and don't
contain any specific html code.

If they are sent by HTTP, they will be sent with an HTTP header. This
header contains a "Content-Type" line which tells the browser what type of
file it's dealing with. If this line is wrong, the browser may act
strangely.
 
P

Pascal Herczog

Toby Inkster said:
If they are sent by HTTP, they will be sent with an HTTP header. This
header contains a "Content-Type" line which tells the browser what type of
file it's dealing with. If this line is wrong, the browser may act
strangely.

Ok, so I've simply uploaded these text files to my webspace, how can I
ensure that when they are sent to the user they are forced to be interpreted
as ordinary text files, destined for the page frame that I've prescibed?

Or can I put something in the <a href...=File.txt> line to do this?

Pascal.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top