Solved

CGI question

Posted on 1997-06-26
1
220 Views
Last Modified: 2013-12-25
I have Microsoft excel plugins. Then It is possible to view Excel files in browser.
But I want to excel files to be viewed in browser or to
be launched by ,for instance, EXCEL which is registerd in netscape(options->helpers) in netscape menu, Selectivley.
Is it possible ? or if it is not possble
Is a way to launch a specific application in client?
Sorry, I am not sure which topic area is fitted to above quetion, CGI or javascript.
Thaks in advance.  
0
Comment
Question by:molla051997
1 Comment
 
LVL 2

Accepted Solution

by:
mkornell earned 0 total points
ID: 1828580
No, CGI is the right area.

When you send the file to the client, you don't have control over what happens to it when it gets there.  What you can do is tell the client what kind of file it is, by using the "Content-type" HTTP header.  For example, HTML files use a header of "Content-type: text/html".  GIF files use a header of "Content-type: image/gif" and Word files use a header of "Content-type: application/msword".

You can have a CGI script set this header explicitly when serving a request, or you can configure your web server to map file extensions to headers (typically, this is set in the mime.types configuration file).

However, it is totally up to the client as to what to do with the file when it gets it.  It looks at the Content-type header (or, in IE's case, the file extension) and figures out what kind of file it is.  Then, its configuration (via options->helpers or otherwise) tells it what application to send the file to.

Netscape calls that its helper list.  IE actually uses the system-wide file type configuration.  For example, I use IE, and I've got my system configured to open .txt files with WordPad.  Whenever I get a .txt file through IE, WordPad gets openend and my selection is displayed.

The web server doesn't have any control over what I do with the text file.  It sends me the file, tells me it is a text file, and I do with it what I please.  The server cannot tell me to open it with (say...) Notepad.

I don't know it that will let you do what you want.  If you configure your web server to send the right Content-type header for a file, the client can be configured to do something with the file.  But the client configuration is under control of the client, not the server.

HTH,
--mark;
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question