All pastes #729018 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-07 16:11 UTC
rendered paste body
$(document).ready(function() {
    var options = {
        target:        '#result',   // target element(s) to be updated with server response
        beforeSubmit:  showRequest,  // pre-submit callback
        success:       processJson,  // post-submit callback

        dataType:  'json',
        resetForm: true,

        // $.ajax options can be used here too, for example:
        timeout:   3000 
    }; 

    // bind form using 'ajaxForm'
    $('#demo-cgi-form').ajaxForm(options);
});