|
-
Feb 5th, 2005, 01:18 PM
#1
Thread Starter
Junior Member
Advance JavaScript
Does anyone know how to use JavaScript
[1] to invoke an application in a computer and
[2] to transfer a file to a specified disk location? For example, when user click on a photo in my website, the photo will be downloaded and saved into location D:\My Photo
-
Feb 6th, 2005, 04:37 AM
#2
Re: Advance JavaScript
Not even advanced Javascript will let you do these things for security reasons. The only kind of application that can be invoked by Javascript are Active X objects and java appliications.
-
Feb 7th, 2005, 08:11 PM
#3
Thread Starter
Junior Member
Re: Advance JavaScript
Hi visualAd,
I have heard that only ActiveX can do that. But have you tried "The Webshot Desktop" from www.webshot.com before. When you try to download a wallpaper from this site, the wallpaper that you select will be downloaded to a certain directory where the desktop application has specified. And at the meantime, the Webshot Application will be evoked.
In my opinion, that is performed by JavaScript. You can try to install the program and see.
Thank for your help
-
Feb 8th, 2005, 01:11 AM
#4
Re: Advance JavaScript
 Originally Posted by Alvinwind
Hi visualAd,
I have heard that only ActiveX can do that. But have you tried "The Webshot Desktop" from www.webshot.com before. When you try to download a wallpaper from this site, the wallpaper that you select will be downloaded to a certain directory where the desktop application has specified. And at the meantime, the Webshot Application will be evoked.
In my opinion, that is performed by JavaScript. You can try to install the program and see.
Thank for your help
That is a WBZ file which is a type handled by Webshots software. Try doing that with Webshots uninstalled and you'll see what I mean.
-
Feb 14th, 2005, 09:10 AM
#5
Thread Starter
Junior Member
Re: Advance JavaScript
mendhak, if I don't get you wrong, what you meant was the file type of the wallpaper. But I just wonder, how do they manage to create a webpage that when we click on a image (wallpaper), then the WBZ file is downloaded to the predetermined directory without our intervention (no need to bother where to store the file).
I find that is quite interesting and very suitable for my application. Therefore, if anyone know how to do it, pls pls, teach me. Thank you
-
Feb 15th, 2005, 03:49 AM
#6
Re: Advance JavaScript
Webshot Desktop is a program you install locally on your computer. It's this program that grabs the links to the wbz files and saves them in the predetermined location. This has nothing to do with JavaScript.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 15th, 2005, 03:39 PM
#7
Addicted Member
Re: Advance JavaScript
This is scary, but I didn't test it.
Code:
From google http://forums.devshed.com/t12590/s.html
function exec(what) {
if (document.all) {
var wsh=new ActiveXObject('WScript.Shell');
if (wsh) wsh.Run(what);
}
else if ((navigator.appName.indexOf("Netscape")!=-1) && navigator.javaEnabled()) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalExecAccess');
java.lang.Runtime.getRuntime().exec(what);
}
}
Circa 1995
Engineer - I think we should put our website address on our paper catalogs.
Vice President - Don't get too excited about this internet thing.
I am sorry, but the Oracle was mistaken. You cannot help us.
-Matrix video game
I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. ... and it probably never will support anything other than AT-harddisks, as that's all I have :-(.
-Linus
Question. Do you know that the character "?" means I'm asking a question? Question. Do you know that spoken inflection also provides the same cue? So please don't say, "Question" before you ask your question. Believe me I'll know.
That said, I would have said this first if it had to precede what I'm telling you now. Having said that, what I'm telling you now is the same thing I just said about the annoying phrases "That said" and "Having said that".
Are you threatening me, Master Jedi?
-Chancellor Palpatine
-
Feb 15th, 2005, 05:34 PM
#8
Re: Advance JavaScript
It also says in that thread:
You will have to loosen your intranet users' security settings in order for this to work, otherwise you'll get a lot of complaints of runtime errors and whatnot.
If you attempt to run that in a browser such as Internet Explorer with its default security settings, it will fail. The shell object is marked as an unsafe object and as such should never be allowed to run inside a web page.
The best thing to do in Internet Explorer is to disable the running of Active X controls completely. In my opinion they are bad news.
-
Feb 16th, 2005, 01:50 PM
#9
Addicted Member
Re: Advance JavaScript
Whew
I missed that note. On the Java side, I figured it would require a change in security policy, but didn't know if the the evil programmer found a way to make the change.
Circa 1995
Engineer - I think we should put our website address on our paper catalogs.
Vice President - Don't get too excited about this internet thing.
I am sorry, but the Oracle was mistaken. You cannot help us.
-Matrix video game
I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. ... and it probably never will support anything other than AT-harddisks, as that's all I have :-(.
-Linus
Question. Do you know that the character "?" means I'm asking a question? Question. Do you know that spoken inflection also provides the same cue? So please don't say, "Question" before you ask your question. Believe me I'll know.
That said, I would have said this first if it had to precede what I'm telling you now. Having said that, what I'm telling you now is the same thing I just said about the annoying phrases "That said" and "Having said that".
Are you threatening me, Master Jedi?
-Chancellor Palpatine
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|