Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Permission Denied: <a onClick=executeCommands()

    I have an html page with javascript code. The following code:

    <a onClick=executeCommands(2,1,'A\\','R\\','AC001','.PIA',1)>
    <img src=R:\TEST\SCRIPTS\main\compare.gif border=0 align=absmiddle></a><BR>

    essentially creates a button that, when clicked, runs wincmp.exe (a file diff tool) and compares 2 files. for some reason these html files work fine on some XP\Win2k machines...others it dosent. i get a prompt that says, Permission Denied, Error. any ideas? thanks,

    Rezaur

  • #2
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    945
    Thanks
    0
    Thanked 129 Times in 128 Posts
    You can't run any program from within javascript or HTML itself

    For that you need to include some server-side language (PHP ...?)

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    The code will only work when all of the following conditions are met:

    1. The browser is Internet Explorer
    2. The files are in the appropriate locations on the computer.
    3. Security on the computer is turned off to allow access to those files.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    dont need PHP

    Quote Originally Posted by lerura
    You can't run any program from within javascript or HTML itself

    For that you need to include some server-side language (PHP ...?)

    lerura, thank you for your help. well i dont need the PHP or server side language, i finally got it to work, but i had to change the code a bit. i just made the button reference a *bat file that does what i need to do. still wish i knew what the problem was. thank you though!

    rezaur

  • #5
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall
    The code will only work when all of the following conditions are met:

    1. The browser is Internet Explorer
    2. The files are in the appropriate locations on the computer.
    3. Security on the computer is turned off to allow access to those files.

    felgall, all those conditions were met. and this same code\pages work on other machines, just not on some. not sure what the problem was. had to change the code. thank you for your help anyway!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •