Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


open a windows application with javascript from Mozilla, Firefox or Netscape

Posted on 2004-09-13
Medium Priority
Last Modified: 2008-01-09
Background - problem to be solved:
Client wants a particular excel spreadsheet to open from a local HTML page (link, button or automatically)
e.g. open (fixed path and name on local windows network share) \\server\share\path\file.xls from file://///server/share/path/start_here.html.  

IE is not an option.

Can I do this with javascript?, if so how? If not, can you suggest an alternative that is low- to no-maintenance.  All machines have current Java environment on them.  WSH is not available.
Question by:santa_0
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
LVL 63

Accepted Solution

Zvonko earned 1200 total points
ID: 12047266
A simple anchor link will do it.
Here is my example for your start_here.html:
<a href="file.xls ">Excel</a>

The user get asked when clicking on the "Excel" link: () "Open with default application (Excel)"

Assisted Solution

inq123 earned 300 total points
ID: 12047300
Hi santa_0,

Why don't you just use

<a href="file://///server/share/path/file.xls">load xls file</a>

or even just

<a href="file.xls">load</a>

because the html is in the same directory as xls file.  You could also stream the file over, but why bother?


Expert Comment

ID: 12047312
oops, Zvonko beats me to it. :)

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.


Author Comment

ID: 12048767
Thanks for the replies.  Zvonko gets the points.  In actual fact, I decided on a button since there was another step in the process, and the buttons for the two steps seemed more logical to the end users.

ftr here's what I did.  I used the javascript so the filename would be more easily changed later:

<meta content="text/html; charset=ISO-8859-1"
<title>Title of Page</title>
// set up a "variable" so that we can fix the file location when someone moves or renames the file
// nb -- the path is reference in the body in some text, too
<script language="JavaScript">
function theFile() {
window.location= 'file://///server/share/path/file.xls';
<big><big><big style="color: rgb(255, 0, 0);">Remember to check the
This page needs the list to be:<br>
\\server\share\path\file.xls <br>
<input onclick="theFile()" value="Open the list (w/Excel)" type="button">
<input onclick="location.href='http://www.google.com" value="do the next step" type="button">
LVL 63

Expert Comment

ID: 12048855
Thanks for sharing your solution here.
But why the grading B?
It does not cost you more to give an A and experts get less points with grading B.
My recommendation is to give B only when you get disappointed by the experts.

If you want to do me a favor, then please ask Community Support to release this question again so you can split the points fifty-fifty with an A.
Here the link to CS TA: http://www.experts-exchange.com/Community_Support/



Author Comment

ID: 12093746
I gave a B because I couldn't find the grading tips, and I needed to move on.  So I guessed.  "A" is usually reserved for extra or outstanding effort (for example, solution for link AND button AND auto-execute).   After finally locating the FAQ with the grading tips, I still think the description for B pretty clearly matches my situation.  But I do note the discussion about grade inflation a little further on from there, and that I have probably been too stingy.  

Now, this is my first post here, but after doing the arithmetic, (http://www.experts-exchange.com/Community_Support/help.jsp#hi20) I think I'll decline your request to re-arrange the points, since that would reduce your points from 1200 to 1000, and it's just not worth the effort and cost to increase inq123's when he didn't request it (and after this much poking about in the bowels or E-E, it *really* won't be worth it). :^)

BTW these are the grading guidelines I relied upon:

I will keep your recommendation in mind for the next question.

Thanks again for the tip!
LVL 63

Expert Comment

ID: 12094819
First of all: I have enough points ;-9
Second: I succeeded in my goal making you sensible for Expert's point of view ;-)


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

618 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