By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,133 Members | 1,300 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,133 IT Pros & Developers. It's quick & easy.

how to launch a window's application from webpage using java?

P: n/a
I want to use some javascript to launch a windows application (this used on
intranet) but don't know how. Can anyone help me out please?

It'd be neat if I could not only launch the application but minimize the
webpage's browser at the same time, but this is just icing on the cake...

-dg
Jul 20 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
dan glenn wrote:
I want to use some javascript to launch a windows application (this used on
intranet) but don't know how. Can anyone help me out please?

It'd be neat if I could not only launch the application but minimize the
webpage's browser at the same time, but this is just icing on the cake...


If by "windows application" you mean a Microsoft windows application,
then AFAIK you can't.

bengee

Jul 20 '05 #2

P: n/a
And on the day Sat, 11 Oct 2003 08:24:46 GMT, da********@yahoo.com
enlightened us with <i7*****************@newssvr25.news.prodigy.com>.. .
I want to use some javascript to launch a windows application (this used on
intranet) but don't know how. Can anyone help me out please?


If using IE, you can use ActiveX.

objXL = new ActiveXObject("Excel.Application");
objXL.Visible = true;
--------------------------------------------------
~kaeli~
Kill one man and you are a murderer. Kill millions
and you are a conqueror. Kill everyone and you
are God.
http://www.ipwebdesign.net/wildAtHeart/
http://www.ipwebdesign.net/kaelisSpace/
------------------------------------------------
Jul 20 '05 #3

P: n/a
"bengee" <po********@localhost.localdomain> wrote in message
news:u7*******************@wards.force9.net...
dan glenn wrote:
I want to use some javascript to launch a windows application (this used on intranet) but don't know how. Can anyone help me out please?

It'd be neat if I could not only launch the application but minimize the
webpage's browser at the same time, but this is just icing on the
cake...
If by "windows application" you mean a Microsoft windows application,
then AFAIK you can't.

bengee


Actually, what I need to run is a help application (.chm) file. It seems
incredible that there is no way to do this! (Platform is Win98, IE6)

-dg


Jul 20 '05 #4

P: n/a
"kaeli" <in********************@NOSPAMatt.net> wrote in message
news:MP************************@netnews.worldnet.a tt.net...
And on the day Sat, 11 Oct 2003 08:24:46 GMT, da********@yahoo.com
enlightened us with <i7*****************@newssvr25.news.prodigy.com>.. .
I want to use some javascript to launch a windows application (this used on intranet) but don't know how. Can anyone help me out please?


If using IE, you can use ActiveX.

objXL = new ActiveXObject("Excel.Application");
objXL.Visible = true;
--------------------------------------------------
~kaeli~
Kill one man and you are a murderer. Kill millions
and you are a conqueror. Kill everyone and you
are God.
http://www.ipwebdesign.net/wildAtHeart/
http://www.ipwebdesign.net/kaelisSpace/
------------------------------------------------


Thanks, ~kaeli~, but actually I need to bring up a Windows ".chm" help
application. (platform is Win98, IE6) Can this be done with Java in some
way??

-dg
Love one and you are average. Love millions and
you are a saint. Love everyone and you are God.
Jul 20 '05 #5

P: n/a
In article <AU********************@newssvr21.news.prodigy.com >,
da********@yahoo.com enlightened us with...

Thanks, ~kaeli~, but actually I need to bring up a Windows ".chm" help
application. (platform is Win98, IE6) Can this be done with Java in some
way??


Not Java - use IE and ActiveX with WSH (windows scripting host).
I tested this with Win2K/IE6, so I would hope it works in 98...
Change the variable helpFile to point to the one you want to open. the
double slashes to separate the directory names are necessary.

<html>
<head>
<title> New Document </title>
</head>

<body>
<SCRIPT Language="JScript">
function openHelp() {
helpFile="C:\\WINNT\\Help\\access.chm";
WSH=new ActiveXObject("WScript.Shell");
WSH.run(helpFile);
}
</SCRIPT>
<A href="#" onClick="openHelp(); return false;">Open Help File</A>
</body>
</html>
-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #6

P: n/a
"kaeli" <in********************@NOSPAMatt.net> wrote in message
news:MP************************@nntp.lucent.com...
In article <AU********************@newssvr21.news.prodigy.com >,
da********@yahoo.com enlightened us with...

Thanks, ~kaeli~, but actually I need to bring up a Windows ".chm" help
application. (platform is Win98, IE6) Can this be done with Java in some
way??


Not Java - use IE and ActiveX with WSH (windows scripting host).
I tested this with Win2K/IE6, so I would hope it works in 98...
Change the variable helpFile to point to the one you want to open. the
double slashes to separate the directory names are necessary.

<html>
<head>
<title> New Document </title>
</head>

<body>
<SCRIPT Language="JScript">
function openHelp() {
helpFile="C:\\WINNT\\Help\\access.chm";
WSH=new ActiveXObject("WScript.Shell");
WSH.run(helpFile);
}
</SCRIPT>
<A href="#" onClick="openHelp(); return false;">Open Help File</A>
</body>
</html>
-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------


Right - not 'java' - I meant javascript when I typed 'java'. I know what you
say here will work because someone else from an HTML newsgroup pointed me to
a long-winded general purpose 'launch' javascript program that used windows
scripting host and ActiveX object as well, in the same way. When I tried
that, it worked, but IE would always prompt with a security warning about
the ActiveX being downloaded that the user would have to step past.

Since then someone referred me to a page which said all I needed to use was
'showHelp' with the argument being the path-filename of the .chm help file.
In other words:

function openHelp() {
window.showHelp('c:/path/helpfile.chm');
}

This works perfectly - no IE security warning to have to step past. At least
on my XP home machine, it works. The article said it should also work on
Win98 (where I intend to install it), and for Win95 it could be made to work
by downloading something or other and installing it, but I didn't pay much
attention to that, not having to worry about win95.

-dg
Allah protects, Jesus redeems, Buddha awakens.
I sure could go for a good hamburger right now.
Jul 20 '05 #7

P: n/a
In article <F_**********************@newssvr21.news.prodigy.c om>,
da********@yahoo.com enlightened us with...

function openHelp() {
window.showHelp('c:/path/helpfile.chm');
}

This works perfectly - no IE security warning to have to step past. At least
on my XP home machine, it works.


Hey, that's good to know.
It probably only works in IE, but for many intranet applications, that
suffices.
Thanks for the tip.
-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.