[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1001
  • Last Modified:

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

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.
0
santa_0
Asked:
santa_0
  • 3
  • 2
  • 2
2 Solutions
 
ZvonkoSystems architectCommented:
A simple anchor link will do it.
Here is my example for your start_here.html:
<html>
<body>
<a href="file.xls ">Excel</a>
</body>
</html>

The user get asked when clicking on the "Excel" link: () "Open with default application (Excel)"
0
 
inq123Commented:
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?

Cheers!
0
 
inq123Commented:
oops, Zvonko beats me to it. :)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
santa_0Author Commented:
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:

<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<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';
}
</script>
</head>
<body>
<center>
<br>
<big><big><big style="color: rgb(255, 0, 0);">Remember to check the
list!</big></big></big><br>
This page needs the list to be:<br>
\\server\share\path\file.xls <br>
<br>
<input onclick="theFile()" value="Open the list (w/Excel)" type="button">
<p><br>
</p>
<input onclick="location.href='http://www.google.com" value="do the next step" type="button">
</center>
</body>
</html>
0
 
ZvonkoSystems architectCommented:
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/

Cheers,
Zvonko

0
 
santa_0Author Commented:
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:
http://www.experts-exchange.com/Community_Support/help.jsp#hi73

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

Thanks again for the tip!
d.
0
 
ZvonkoSystems architectCommented:
First of all: I have enough points ;-9
Second: I succeeded in my goal making you sensible for Expert's point of view ;-)

Cheers,
Zvonko
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now