🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.javascript
5 messages
5 total messages Started by Eddie Shave Mon, 14 Oct 1996 00:00
Can I execute another application?
#230
Author: Eddie Shave
Date: Mon, 14 Oct 1996 00:00
12 lines
1006 bytes
I'm using win3.1/Netscape3.0
Can I call a dos program using the javascript OnClick() event. ?
This program will create and save a html document, then terminate. Control 
should then return to the JavaScript.
Alternatively is there a way to create and save the document using java 
alone?

--
Eddie Shave 
Derbyshire UK
eshave@edlyn.demon.co.uk
Re: Can I execute another application?
#231
Author: Jan Krynicky
Date: Mon, 14 Oct 1996 00:00
21 lines
1227 bytes
Eddie Shave wrote:
> 
> I'm using win3.1/Netscape3.0
> Can I call a dos program using the javascript OnClick() event. ?
> This program will create and save a html document, then terminate. Control
> should then return to the JavaScript.
> Alternatively is there a way to create and save the document using java
> alone?
> 
> --
> Eddie Shave
> Derbyshire UK
> eshave@edlyn.demon.co.uk

Short answer: NO

For very good reasons. You probably don't want anybody to format your harddisk, do 
you?

Jenda
Re: Can I execute another application?
#232
Author: David A. Agbamu
Date: Mon, 14 Oct 1996 00:00
43 lines
1882 bytes
On Mon, 14 Oct 1996 10:07:41 +0100 Eddie Shave
<eshave@edlyn.demon.co.uk> wrote:

>I'm using win3.1/Netscape3.0
>Can I call a dos program using the javascript OnClick() event. ?
>This program will create and save a html document, then terminate. Control 
>should then return to the JavaScript.
>Alternatively is there a way to create and save the document using java 
>alone?

This is half an answer. 
1)You need Batsh 220
ftp://ftp.demon.co.uk/pub/mirrors/simtel/win3/batch/batsh220.zip
(It may have changed version numbers since I downloaded it)

2) Associate the extension *.bsh with Batsh220

A batsh file is very similar to a batch file, but will run under
Windows. Create a batsh file dosprog.bsh:

dosprog.exe

3) In Netscape set Batsh220 as the helper app for *.bsh files

4) You can then create a URL to dosprog.bsh 

<A HREF="dosprog.bsh">dosprog</A>

or <A HREF="file:///C|/dosprog/dosprog.bsh">dosprog</A>

where C:\dosprog\dosprog.bsh is the path to dosprog.bsh

which should run when the URL is clicked on.

Let me know if it works.


David
-- 
David A. Agbamu, Manchester, UK.
The Absolute Beginner's Guide to creating a Demon Homepage
http://www.agbamu.demon.co.uk/ABG/ABG.html
Re: Can I execute another application?
#228
Author: Eddie Shave
Date: Thu, 17 Oct 1996 00:00
55 lines
2244 bytes
In article <3263a2f9.11279589@news.demon.co.uk> David A. Agbamu wrote:
> On Mon, 14 Oct 1996 10:07:41 +0100 Eddie Shave
> <eshave@edlyn.demon.co.uk> wrote:
> 
> >I'm using win3.1/Netscape3.0
> >Can I call a dos program using the javascript OnClick() event. ?
> >This program will create and save a html document, then terminate. 
Control 
> >should then return to the JavaScript.
> >Alternatively is there a way to create and save the document using java 
> >alone?
> 
> This is half an answer. 
> 1)You need Batsh 220
> ftp://ftp.demon.co.uk/pub/mirrors/simtel/win3/batch/batsh220.zip
> (It may have changed version numbers since I downloaded it)
> 
> 2) Associate the extension *.bsh with Batsh220
> 
> A batsh file is very similar to a batch file, but will run under
> Windows. Create a batsh file dosprog.bsh:
> 
> dosprog.exe
> 
> 3) In Netscape set Batsh220 as the helper app for *.bsh files
> 
> 4) You can then create a URL to dosprog.bsh 
> 
> <A HREF="dosprog.bsh">dosprog</A>
> 
> or <A HREF="file:///C|/dosprog/dosprog.bsh">dosprog</A>
> 
> where C:\dosprog\dosprog.bsh is the path to dosprog.bsh
> 
> which should run when the URL is clicked on.
> 
> Let me know if it works.
> 
> 
> David
> -- 
> David A. Agbamu, Manchester, UK.
> The Absolute Beginner's Guide to creating a Demon Homepage
> http://www.agbamu.demon.co.uk/ABG/ABG.html
> 

Works fine... :)

Thanks to all who replied.

--
Eddie Shave 
Derbyshire UK
eshave@edlyn.demon.co.uk
Re: Can I execute another application?
#229
Author: Ken Bigelow
Date: Thu, 24 Oct 1996 00:00
76 lines
3252 bytes
Eddie Shave wrote:
> 
> In article <3263a2f9.11279589@news.demon.co.uk> David A. Agbamu wrote:
> > On Mon, 14 Oct 1996 10:07:41 +0100 Eddie Shave
> > <eshave@edlyn.demon.co.uk> wrote:
> >
> > >I'm using win3.1/Netscape3.0
> > >Can I call a dos program using the javascript OnClick() event. ?
> > >This program will create and save a html document, then terminate.
> Control
> > >should then return to the JavaScript.
> > >Alternatively is there a way to create and save the document using java
> > >alone?
> >
> > This is half an answer.
> > 1)You need Batsh 220
> > ftp://ftp.demon.co.uk/pub/mirrors/simtel/win3/batch/batsh220.zip
> > (It may have changed version numbers since I downloaded it)
> >
> > 2) Associate the extension *.bsh with Batsh220
> >
> > A batsh file is very similar to a batch file, but will run under
> > Windows. Create a batsh file dosprog.bsh:
> >
> > dosprog.exe
> >
> > 3) In Netscape set Batsh220 as the helper app for *.bsh files
> >
> > 4) You can then create a URL to dosprog.bsh
> >
> > <A HREF="dosprog.bsh">dosprog</A>
> >
> > or <A HREF="file:///C|/dosprog/dosprog.bsh">dosprog</A>
> >
> > where C:\dosprog\dosprog.bsh is the path to dosprog.bsh
> >
> > which should run when the URL is clicked on.
> >
> > Let me know if it works.
> >
> >
> > David
> > --
> > David A. Agbamu, Manchester, UK.
> > The Absolute Beginner's Guide to creating a Demon Homepage
> > http://www.agbamu.demon.co.uk/ABG/ABG.html
> >
> 
> Works fine... :)
> 
> Thanks to all who replied.
>

I can believe it worked if you installed batsh or a similar utility on
your own computer. But don't depend on it being on any other client's
computer, and don't expect Javascript to access it correctly in that
manner.

I am repeatedly amazed at the number of questions on how to get around
the security precautions very carefully built into Netscape's handling
of Javascript. By deliberate intent, Javascript cannot read or write
files on your computer; if it could, be sure there would be lots of very
unpleasant viruses out there by now, and no doubt some erased hard
drives as well.

Remember: if your page can write an innocuous file to someone else's
hard drive, another page can write a deadly one to yours. Let's
*please!* consider the possible consequences before we try anything like
this!
-- 
Ken

Are you interested in   |
byte-sized education    |   http://www.play-hookey.com
over the Internet?      |
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads