Since Javascript is a client-side side scripting, you'll need to have a server-side script to do the actual writing to a server-side file. If you don't want to use an HTML form to submit the data (perhaps through a hidden form variable), you'll basically be designing a AJAX-like system using a Javascript XMLHttpRequest object.
You intimated that this would be user-based information when you mentioned the idea of storing the data on the client side. How about using a cookie to store the data? David Flanagan's examples of defining a cookie class and using the cookie class may prove helpful here.