hi! I have problem with my jquery validation. When I successfully submitted my form, the value i enter is still there in the <input:text>. It supposed to be refresh and the form is emptied.
here's my jquery code
// JavaScript Document
$(document).ready(function(){
$("#myformcom").submit(function(){
var str=$(this).serialize();
//var result;
$.ajax({
type: "POST",
url: "submitcomment.php",
data: str,
success:function(msg)
{
$("#error").ajaxComplete(function(event,request,settings)
{
if(msg=='Successfully Submitted')
{
$(this).html(msg);
}
else{
$(this).html(msg);
}
return true;
});
}
});
return false;
});
});
how can i refresh my page when it is successful?