Ajax form not submit. Is this wrong? please expain
function send_enquiry(url)
{
if(document.sendenquiry.onsubmit())
{
$.ajax({
type:"POST",
url:"send.php",
data:'url='+url+'&action=service_enquiry&name='+$('#name').val()+'&mail='+$('#email').val()+'&phone='+$('#phone').val()+'&msg='+$('#msg').val(),
success:function(html)
{
if(html=='true')
{
$('#process').html('');
alert('Message has been sent to the advertiser !!');
div_hide();
}
},
beforeSend:function()
{
var ajax_image = "<img src='images/loading.gif' alt='Loading...' style='width:18px; height:18px;' />";
$('#process').html(ajax_image);
}
})
}
}
Ajax form not submit.