Saving input text into TXT file

Hello everbody.
I heard that Flash cannot save the inputted text into external TXT file, and I heard that the only way is to do this with server-side language like JS, PHP and etc.
Can someone explain how to do this with JS? because JS not requiering any server installation…
Somebody have an Idea?