View Full Version : Opening a program using javascript?!

06-05-2004, 05:11 PM
I am a newbie to javascript and i want to do the following thing->
I want to open a program on the computer using javascript which is embedded in an html page. I have a good knowledge of HTML and i know that this can be done :D Is there a way? Please help me i am only 14 - lol -
Also if u can, can u control the program like give a simple text command which in typed in the program and executed, please help, any help will be appreciated. Thank You all for viewing.

Mr J
06-05-2004, 08:49 PM
I do not think there is any way Javascript can be used to access or control programs on a computor.

If this was possible just think of the mayhem malicious hackers would cause if they got control of the programs on your computor

06-05-2004, 10:15 PM
hey and welcome, im 13 lol, so im stupid but do you mean sumthing like this:

<input type="file">


06-05-2004, 11:22 PM
Surprise, surprise, im 13 too.

First off, <input type="file"> does not exist.

There are ways to open programs via command line, though.
They have to be on the users computer and and command line features
set up. EX: <a href="aim:goim?username='d3ment3dparrot'">Click here to IM me</a> will Instant message me using AIM.
(This can also be used on the Start--Run dialog box in windows.)

If the file is a video or audio file, you could put:

<embed src="yourfile.wmv" width="500" height="500" autostart="yes">

or if its an audio file (ex: background music) you could put

<embed src="yourfile.mp3" width="0" height="0" autostart="yes" loop="no">

Or if the file is a text or pdf file, you could use the window.location feature:
<a href="javascript:window.location='yourfileurl'">View file</a>

So, as you can see, it really depends on what kind of file you are dealing with.

Hope I helped

06-05-2004, 11:27 PM
o i didnt really understand what he was talking about, but yeah <input type="file"> works... where are you putting it??

06-06-2004, 02:40 AM
<input type="file"> only lets u select a file location.

06-07-2004, 10:39 AM
hope you're not looking to write a virus or trojan, pal? manipulating files on a persons PC without their actual say so is evil.

hmmm ... your age makes me think you might be a script-kiddie or something LOL

Mr J
06-07-2004, 03:18 PM
Age doesn't matter :D

It's the intention :confused:

06-07-2004, 04:22 PM
It's the intention :confused:

I do not think there is any way Javascript can be used to access or control programs on a computor.

that's just it. there is. there's plenty. trust me. cause i know of several seemingly innocuous methods, but which are quite dangerous in the wrong hands.

now, tho people of all ages hack, his age, the fact that he's got no real experience and the suspicious nature of the question, mark him out as a script-kiddie.

of course, that's partly prejudice on my part. he may be completely innocent, but it's nonetheless the kind of thing script-kiddie's do.

*just being cautious*