top | item 5547912

(no title)

psherman | 13 years ago

Assuming you give your form elements names and the form an ID (unlike in the linked example) its trivial to get the query string using serialize and you don't have to fuss around with string formatting if you modify the form.

    $.ajax({
      url: 'ajax-example.php',
      data: $('#myForm').serialize(),
      success: function(data) {
          $('#ajaxDiv').html(data);
      }
    });

discuss

order

No comments yet.