phpjqueryjqueryform

How to post a form using jquery?


Possible Duplicate:
submit a form using jquery

Hello friends

How can I submit a form using jquery. My form contain one file field also how can I post my form with out reloading the whole page. Any body can help me with some sample code?


Solution

  • $.ajax({
        type: 'post',
        url: 'servletToUSe',
        data: {
            "fieldValue": $('#fieldName').val()
        },
        success: function () {
            //response handler
        }