Hi
My First post didn't appear so the is a repeat of my earlier post.
I am using Jquery ajax to post data to my Mysql table and trying to display back the result in the same page. Database insertion is working ok, but I am not able to display back the result. What is wrong with my code?.
[code]
<script>
$(document).ready(function(){
$("#addcustomer").validate();
$("p.submit").live("click",function() {
if($("#myform").valid())
{
$.ajax({
data: $this.serializeArray(),
dataType: "html",
type: "POST",
url: "add_customer.php",
success: function(html) {
goToByScroll("footer");
document.getElementById("footer").innerHTML=html;
}
});
}
});
});
</script>
[/code]
Also when I submit the form I am seeing my form data In the URL as if I am using post method of "GET". But I am using "POST". What could be the reason for this.
Here is my URL after I press submit.
http://localhost/invoice/add_customer.html?name=test&addl1=etty&addl2=jhg&phone=g897&tinno=7978jhhk&excise=hkhkTIA
SKN