Could you define "not working"?
Are there any error messages?
Is $("#contact_form").serialize() not giving the right values?
Is the AJAX request not being sent?
Is there no response coming back from the AJAX request?
Try adding an 'error' callback also to see if it gets called.
On Jul 15, 6:24 pm, robotwink <[email protected]> wrote:
> Hi guys,
>
> I need to send the whole form to the server for processing. I have
> this now, which is not working:
>
> $.ajax({
> type: "POST",
> url: "file.php",
> data: $("#contact_form").serialize(),
> success: function(data){
> alert('ok');
> }
> });
>
> Please let me what's wrong and how to fix it. Thanks.