Solved

CGI question

Posted on 1997-06-26
1
206 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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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)

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now