Results 1 to 9 of 9

Thread: Advance JavaScript

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2004
    Posts
    29

    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

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2004
    Posts
    29

    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

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Advance JavaScript

    Quote 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.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 2004
    Posts
    29

    Red face 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

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    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.

  7. #7
    Addicted Member Phenix's Avatar
    Join Date
    Sep 2002
    Location
    Near A Cube
    Posts
    228

    Unhappy 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

  8. #8
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  9. #9
    Addicted Member Phenix's Avatar
    Join Date
    Sep 2002
    Location
    Near A Cube
    Posts
    228

    Thumbs up 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
  •  



Click Here to Expand Forum to Full Width