Solved

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

Posted on 2004-09-13
7
974 Views
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.
0
Comment
Question by:santa_0
  • 3
  • 2
  • 2
7 Comments
 
LVL 63

Accepted Solution

by:
Zvonko earned 400 total points
Comment Utility
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
 
LVL 8

Assisted Solution

by:inq123
inq123 earned 100 total points
Comment Utility
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
 
LVL 8

Expert Comment

by:inq123
Comment Utility
oops, Zvonko beats me to it. :)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:santa_0
Comment Utility
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
 
LVL 63

Expert Comment

by:Zvonko
Comment Utility
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
 

Author Comment

by:santa_0
Comment Utility
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
 
LVL 63

Expert Comment

by:Zvonko
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…

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