What\'s the best javascript library, or plugin or extension to a library, that has implemented autosaving functionality?
The specific need is to be able to \'save\'
Autosave should be pretty simple to implement, and you could use one of the major frameworks like jquery or mootools. All you need to do is use window.setTimeout() once your user edits something that should be autosaved, and have that timeout call the javascript frameworks standard AJAX stuff.
For example (with jquery):
var autosaveOn = false;
function myAutosavedTextbox_onTextChanged()
{
if (!autosaveOn)
{
autosaveOn = true;
$('#myAutosavedTextbox').everyTime("300000", function(){
$.ajax({
type: "POST",
url: "autosavecallbackurl",
data: "id=1",
success: function(msg) {
$('#autosavenotify').text(msg);
}
});
}); //closing tag
}
}