www.webdeveloper.com
Results 1 to 5 of 5

Thread: Accessing Client Resources !

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Accessing Client Resources !

    Hello forum,

    I am a embedded developer new to web development. This is my first post here !
    I designed a simple website with html and php. Now I will configure it to send some data to client as a file.
    There will be an application at client which will transfer this file to other board via UART interface. Now at this point, user has to download the file and use it with the application to get job done.

    My question is, Can we invoke client side application (command line executable) to automate it somehow ??
    taking permission from user at first time is fine.

    I came across 'ActiveX' but can't use it since both server and client are on Linux platform. Any easy way out?

  2. #2
    Join Date
    Oct 2012
    Posts
    41
    Javascript is forbidden from accessing files on the clients (users) machine, and can't execute programs on the client either.

  3. #3
    Join Date
    Jan 2013
    Posts
    2
    So is there any other way to achieve it ? (in Linux environment). Or can we somehow grant permissions to java scripts to achieve this ?

  4. #4
    Join Date
    Mar 2009
    Posts
    467
    Maybe I don't understand your precise problem, but you can download files from a server by indirection, they just need to be in a safe javascript format such as a JSON structure or a quoted escaped string that can be parsed.

  5. #5
    Join Date
    Oct 2012
    Posts
    41
    As I understand it, most, if not all browsers run javascript in a secure sandbox which can only access the DOM of the current web page, or files on the *server* within the web root directory of the website via AJAX calls. There's no way for the javascript engine to interact with files on the client, or run shell commands on the client.

    Assuming what you want to do is:
    1) download a file to a *client* machine
    2) run a shell command on the *client* machine using the copied file

    I'd say the best solution is to write a java app which the user downloads to their machine which when run performs the above steps.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles