Hi Bill,

You can read the file into a local variable, or build it on the fly,
then set the http header to something other than an application that the
browser will recognize. The browser will then prompt you to download it.
Like this:

<@assign local$httpHeader value="HTTP/1.1 <@HTTPSTATUSCODE>
<@HTTPREASONPHRASE><@CRLF>Content-Type:
application/download<@crlf>Content-Length: <@length <@var
local$theFile>><@crlf>Content-Disposition: attachment;
filename=<@dq><@var
local$fileName><@dq><@crlf><@setcookies><@userreferencecookie><@crlf>>
<@purgeresults><@var local$theFile encoding=none>

Note that assign tag should all be on one line, and be sure there are no
extra characters. You can launch this in a new window or a hidden frame
to avoid having the user leave your current page. Also that http header
is valid for Witango 5, in previous versions it's slightly different.

Dave

-----Original Message-----
From: Bill Downall [mailto:[EMAIL PROTECTED] 
Sent: October 17, 2003 3:27 PM
To: [EMAIL PROTECTED]
Subject: Witango-Talk: File download link

I need to set up a link for users to download and save to their own disk
a small 
MS Excel worksheet. 

We do not ever want it to automatically load into their browser, but the
user  
should always get a "file save" dialog when the click a button or other
link.

What do I need to do to set up this link?  Thanks.

Bill





________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to