I have a need to capture the topics of a search from one of my blog pages and write it to text file for followup. I have been able to capture the input string, however, am n
JavaScript cannot read/write files from the client or write files to the server (directly).
If you want to write files to the server consider using server-side scripts that will interact with your javascript - and example on how to do this with a little bit of PHP.
In terms of client file interaction this is simply impossible for security reasons (unless it is uploaded to the script in which case it is read accessible).
You can however store data on clients - I have previously been using jStorage and highly recommend it. It works cross-browser (even on IE 6) and is extremely easy to use.