How to save updated text file?

How to save updated text file?

In this post I got response to my question on how to read the text file (using jQuery) and show the information on the page.


Reading text file:

$.get('Files/Address.txt', function(textData,) {
aLines = textData.split("\n");
      $.each(aLines, function(n, sLine) {
         // your code comes here
      });
}, 'text');


Now the natural following of my previous post:


How to update and save the text file with edited contents?


Tom