-2

I am making a web site that makes a record of the person who visit it

I have created a html form page that requests the name from the user

But I am unable to figure out how to keep record of it,maybe something like using making a text file and having javascript add names to it,but I am not sure how to do it

I am using Google drive and drv.tw to upload the site so I can't use any server side scripting language

Raj jaiswal
  • 11
  • 1
  • 6
  • 1
    Javascript is a client side langauge. It doesn't have access to the filesystem for security reasons. It's not possible to have it write a txt file (or any other file) on your host. – icecub Dec 03 '20 at 14:22

1 Answers1

0

Native JavaScript has not access to user's file system. But Node.js has, try this one if u can. In native JS you can use something like localStorage. But this solution only for your task, do not use this for production...

  • _"I can't use any server side scripting"_. And localStorage doesn't let him retrieve the data from other users. It's local. It's simply not possible given OP's situation. – icecub Dec 03 '20 at 14:24
  • If users will come from one local machine, local storage - solution. In another cases - yes, it's not possible) – Vlad Brezitskiy Dec 03 '20 at 14:32
  • Node.js does not work for google drive hosted websites either... Is there a way to make record without ANY server side language at all – Raj jaiswal Dec 03 '20 at 15:02