Hello.
Could some please advise how to include a php file to update content in a div upon successful Ajax form submit?
This works:
jQuery(form).ajaxSubmit({
success: function() {
$('#ajaxRenew').load('script.php');
}
});
but my script.php requires headers, etc, from the page it gets included into (it works ok as "Include" normally), and with .load it does not get them, producing warnings.
I read that Ajax is to be used in this case (.replace?), but I am trying the whole day and can not get it work.
I need something like this:
jQuery(form).ajaxSubmit({
success: function() {
$('#ajaxRenew').replace('script.php');
}
});
I hope you will understand my question. Thank you!