return false; and form submit
Posted: Tue Feb 11, 2014 4:18 am
I use following code to get data list , but in my data List , every row is a form , update is allowed,
my problem if I keep return false; my result form will not submit , if I remove the return false;
my update submit form is work , bu the java post is not work
my problem if I keep return false; my result form will not submit , if I remove the return false;
my update submit form is work , bu the java post is not work
Code: Select all
$(document).ready(function(){
$("#btn").click(function(){
var s=$("#surname").val();
var e=$("#email").val();
var n=$("#name").val()
$.ajax({
type: "post",
url: "/extractDataList.php",
data: "surname="+s+"&email="+e+"&name="+n,
success: function(msg) {$("#mylist").html(msg)}
});
return false; // avoid to execute the actual submit of the form.
});