Wiggins d'Anconia wrote:

Most browsers will provide this functionality if the return header is "application/octet-stream" rather than "text/html" or the like. In the case of IE you may have to fool the browser into thinking it is getting something different than it is based on the URL, because it likes to look there for a file extension to determine the file type too.
HTH,
http://danconia.org

Hi Wiggins
Thanks... I just tried putting these three lines in a .htaccess file in a particular directory...

  AddType application/octet-stream .cgi
  AddType application/octet-stream .txt
  AddType application/octet-stream .htm

Alternatively, I also tried AddType application/octet-stream .cgi .txt .htm

Using the Mozilla 5.0 Suite browser, I get the following results....

And then trried clicked on links to a .cgi file, a .txt file, and a .htm file in that directory.... Only the .htm file automaticaly brought up a 'Save as...' diaglogue box as I left clicked on the link to the .htm file

when I clicked on the link to the .txt file, the contents of the .txt file appeared in a Wordpad window.

When I clicked on the link to the .cgi file, the .cgi file was executed and the results displayed in the browser window.

One out of three right!

----------------------------
Using the Microsoft IE 6.0 browser, I get the following results....

.htm file -> Displays the .htm file in browser window
.txt file ->  Displays the .txt file in browser window
.cgi file -> Executes the .cgi script and displays results in browser window

zero out of three right!

----------------------------
Using Firefox 1.0 browser, I get the following results...
.htm file -> brings up the 'Save as...' dialogue box
.txt file -> brings up the 'Save as...' dialogue box
.cgi file -> Executes the .cgi script and displays results in browser window

SO....................... Filefox wins by getting two out of the three right!

This method doesn't look very hopeful at this point!
Thanks again
Tony Frasketi




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to