Solved

CGI question

Posted on 1997-06-26
1
214 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

786 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