Re: Download boxes in web page

Subject: Re: Download boxes in web page
From: <puff -at- guild -dot- net>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Thu, 5 Jul 2001 14:45:40 -0400


Joan Bondira (jbondira -at- reesebros -dot- com) asks:
> I'm trying to build a web-based document library, and I want one of
> those download boxes to open when a user clicks a button next to a
> listed file. Can anyone tell me how to accomplish this? Can
> JavaScript do it, or do I need something else?

Strictly speaking there's no way to do this; the feature you're
talking about is not a javascript feature or like the HTML upload tag,
it's a convenience in the way your browser handles certain mime types.
Specifically, when your browser sends a request to a server, the server
responds with a set of headers, including a content-type header that
describes what the content (the part that comes after the headers)
will contain.

Your browser interprets the content-type header and based on
that, decides what to do with the content - display it in a page,
launch it in a helper application, or lacking one of the above, offer
to save it to a file for you. That's where that pop-up comes in.
It's interesting to note, however, that Internet Explorer reportedly
sometimes ignores the mime-type if it recognizes the data type on its
own (i.e. a microsoft word file).

Some common mime-types are text/plain (for text files), text/html
(for web pages), image/gif, image/jpeg, application/pdf. A mime type
that very often causes the "save as" dialog to pop up in IE is
application/octet-stream, indicating binary data.

An interesting looking table of different mime types is at:

http://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html


Just for background, it's interesting to note that the requests
and responses that browsers and http servers push back and forth are
based on mime-encoding. Loosely, each request or response is a set of
headers and data, MIME-style. MIME was invented for internet mail to
support the capability to push a wide variety of types of files around
(prior to that, all mail was either plain text, or plain text
containing uuencoded (i.e. text-ified) shar files).

Steven J. Owens
puff -at- guild -dot- net

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

*** Deva(tm) Tools for Dreamweaver and Deva(tm) Search ***
Build Contents, Indexes, and Search for Web Sites and Help Systems
Available now at http://www.devahelp.com or info -at- devahelp -dot- com

TECH*COMM 2001 Conference, July 15-18 in Washington, DC
The Help Technology Conference, August 21-24 in Boston, MA
Details and online registration at http://www.SolutionsEvents.com


---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.


References:
Download boxes in web page: From: Bondira:Joan

Previous by Author: Re: FW: FW: The repeated/quoted text in your message
Next by Author: Re: ContentMaster
Previous by Thread: Download boxes in web page
Next by Thread: Resizing bitmaps


What this post helpful? Share it with friends and colleagues:


Sponsored Ads