$.ajax({
type: "POST",
url: "contacts.php",
data: dataString,
cache: false,
success: function(data, status, settings)
{
alert(The request URL and DATA);
}
,
error: function(ajaxrequest, ajaxOptions, thrownError)
{
}
});
How can I alert the The request URL and DATA parameters inside the Success function?
Thank You
AJAX success is a global event. Global events are triggered on the document to call any handlers who may be listening. The ajaxSuccess event is only called if the request is successful. It is essentially a type function that's called when a request proceeds.
$. ajax({ url: "page. php", data: stuff, success: function(response){ console. log("success"); } });
In most cases, you will need to specify the success and error callbacks. The success callback will be called after the successful completion of the AJAX call. The response returned by the server will be passed along to the success callback.
You can simply;
success: function(data, textStatus, jqXHR)
{
alert(this.data + "," + this.url);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With