#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    4
    Rep Power
    0

    Writing data in files at client machine using javascript in chrome


    Hi,

    I want to write a file using javascript at client machine using chrome.
    Chrome doesnt allow activeX object. however there are add ons to counter the issue.
    The requirement is writing a file without using addon.
    Kindly suggest.
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,009
    Rep Power
    2791
    The reason that Chrome does not allow ActiveX is because it is a massive security risk. You are not going to be able to read or write any data to a user's computer without getting the user to disable a vast array of security protocols.

    Please explain what you are trying to accomplish and maybe we can suggest an alternative to this.

    Comments on this post

    • richpri agrees : Isn't tejo93 basicly asking how to hack a client.
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    4
    Rep Power
    0
    Hi,
    Suppose i am placing an order in website and the data is stored on the server. After submission of the data on server i want the same data to be stored at client machine in json file in json format using javascript.




    Originally Posted by Winters
    The reason that Chrome does not allow ActiveX is because it is a massive security risk. You are not going to be able to read or write any data to a user's computer without getting the user to disable a vast array of security protocols.

    Please explain what you are trying to accomplish and maybe we can suggest an alternative to this.
  6. #4
  7. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,009
    Rep Power
    2791
    I need to know why you are storing the data locally on the user's computer. It would be quite easy to create an automatic download for the user.
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    4
    Rep Power
    0
    Hi,
    I will tell you my apllication functionality:
    1) User shops for items and they are placed in shopping cart.
    2) That detail is stored in browser memory. But now i want the backup of the same data in client machine in json format. SO that by chance if browser cache is cleared user has a restore option.


    Originally Posted by Winters
    I need to know why you are storing the data locally on the user's computer. It would be quite easy to create an automatic download for the user.
  10. #6
  11. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    Use a cookie or HTML5 local storage instead.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    4
    Rep Power
    0
    Hi

    Can you kindly suggest how to use HTML5 local storage.
    And if i clear the cache in the browser all the data will be lost. I want a permanent storage for the same.

    Originally Posted by E-Oreo
    Use a cookie or HTML5 local storage instead.

IMN logo majestic logo threadwatch logo seochat tools logo