Autosave – Flexible Jquery Plugin

Autosave – Flexible Jquery Plugin

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
298 views

Autosave is a flexible autosave plugin for jQuery. If yo want to autosave a form use this simple code.

Features

* Send entire form when one element changes
* Send just the changed element
* Form buttons and input:submit is not sent unless clicked
* Override action/method parameter of form or fallback
* Send elements from multiple forms in one request
* Callbacks on sending, success and error
Usage:

$("input.autosave").autosave({
    url: url, // Defaults to parent form url or window.location.href
    method: "post",  // Defaults to parent form url or get
    grouped: true, // Defaults to false. States whether all "input.autosave" should be sent in the request or only the
    one it was triggered upon
    success: function(data) {
        console.log(data);
    },
    dataType: "json", // Defaults to JSON, but can be XML, HTML and so on
    send: function() {
        // Do stuff while we wait for the ajax response, defaults to doing nothing
        console.log("Saving");
    },
    error: function(xmlReq, text, errorThrown) {
        // Handler if the ajax request fails, defaults to console.log-ing the ajax request scope
        console.log(text);
    }
});
// Submits entire form each time one of the
// elements are changed
$("form#myForm").autosave();
 

Todo:
Support timed autosave for textareas


Demo: http://dllurl.com/60
Download: http://dllurl.com/59
Source: http://dllurl.com/60

http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/magnolia_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/google_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/sphinn_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/mixx_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/twitter_32.png

Related Listings:

  1. jQuery Plugin – autoSave autoSave is the result of one too many user complaints...
  2. Animated Ajax Delete : jQuery I’m a huge fan of WordPress’ method of individual article...
  3. Autopopulating Select Boxes Allow the user to select a top level category from...
  4. Mapbox – Zoomable jQuery Map Plugin The jQuery mapbox() plugin is for creating relatively small scale,...
  5. Ajax File Upload using JQuery Script that simplifies how you traverse HTML documents, handle events, perform...

Do you like this post?

Email:     

Tags: , , , , , , ,

3 Comments »

  1. avatar comment-top

    [...] This post was mentioned on Twitter by shzad1, Eyes Drinker. Eyes Drinker said: RT @3gcreations Autosave – Flexible Jquery Plugin http://bit.ly/4DTk2d [...]

    comment-bottom
  2. avatar comment-top

    [...] found this post on DZone about an form autosave plugin for JQuery, i visited the plugin page, read about everything that is capable to do, and concluded that it [...]

    comment-bottom
  3. avatar comment-top

    [...] Autosave – Flexible Jquery Plugin Autosave is a flexible autosave plugin for jQuery. If yo… [...]

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment



Web Design & CSS (Templates) - TOP.ORG