The technology is called AJAX. Simply, AJAX enables you to make an HTTP request in javascript. When made asynchronously, the request is processed in background (in its own thread) and when finished, a callback function specified by you is executed.
While it is always good idea to know how things are done through the native browser API, javascript libraries such as popular jQuery save you plenty of lines of code. Sample code:
var editor = $('#editor');
/* Hijack regular form submission and send the data via AJAX
by listening 'submit' event. */
editor.submit(function() {
$.post(editor.attr('action'), editor.serialize(), function() {
// code to be executed after successfull request
});
return false;
});
/* Auto-submit the form once per minute by firing 'submit' event. */
setInterval(function() {
editor.submit();
}, 1000 * 60);
HTML:
<form id="editor" action="/path/to/your/save/handler" method="post">
<fieldset>
<textarea name="content" cols="70" rows="30"></textarea>
<button type="submit">Save</button>
</fieldset>
</form>