I know it. But how I can get content from remote file by $.ajax?
For example I have some file temp.php:
Test file
Some text in div header
id =" . $id . "";
echo "number = " . $number . "";
?>
Some text in header2 ...
and Am using $.ajax:
$.ajax({url: 'temp.php',
cache: false,
error: function(msg) {alert("Error Saved: " + msg);},
success: function(msg) {alert("Data Saved: " + msg);},
complete: function() {$.unblockUI();}
});
how I can get for example content only from div with id=header2 ?
On 23 апр, 02:26, James wrote:
> I suggest using the $.ajax() function instead of $.load() as it'll
> provide you more options, including success, error and complete (after
> success and error callbacks are executed)
>
> http://docs.jquery.com/Ajax/jQuery.ajax#options
>
> On Apr 22, 11:49 am, Colonel wrote:
>
> > Is the there way to check ajax request is complete for success?
>
> > On page:http://docs.jquery.com/Ajax/load#urldatacallbackabout
> > callback (Optional): The function called when the ajax request is
> > complete (not necessarily success).