I know it. But how I can get content from remote file by $.ajax?
For example I have some file temp.php:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <title>Test file</title>
 <meta http-equiv="Content-Type" content="text/html;
charset=windows-1251">
</head>
<body>
 <div id="header"><p>Some text in div header</p></div>
 <?
 $id = isset($_GET["ID"]) ? $_GET["ID"] : "";
 $number = isset($_GET["NUMBER"]) ? $_GET["LOT_NUMBER"] : "";
 echo "<p><b>id =</b>" . $id . "</p>";
 echo "<p>number = " . $number . "</p>";
 ?>
<div id="header2"><p>Some text in header2 ...</p></div>
</body>
</html>

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 <james.gp....@gmail.com> 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 <tcolo...@gmail.com> 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).

Reply via email to