I have used a jquery UI tabs plugin in my page and in one of the tab i have put a form. SO for example , the tab calls a page form.php which has the form tag of html. Now form.php uses ajax and jquery to submit the form. Does this sound feasible.
$(document).ready(function(){
$("form#formdata").submit(function() {
var str = $("#formdata").serialize();
$.ajax({
type: "POST",
url: "submit.php",
data: $("#formdata").serialize(),
success: function(msg){
alert(msg);
}
});
return false; });
});
SO the above code comes in my form.php
The form gets submitted but , not via ajax, and am directed to submit.php I want to reflect the result in my UI tabs itself.
Please suggest..thanks
EDIT : i put preventdefault() and return false , but it did not help..