[jQuery] How to cancel an AJAX request?

[jQuery] How to cancel an AJAX request?

Hello,<div>
</div><div>Is there a way to stop or cancel an ajax request on demand, similar to pressing "stop" in the browser? I would like to provide the user with a cancel button on a "loading" dialog that, when clicked, closes the dialog and cancels the ajax request. I have the dialog working (thanks to jQuery-UI) but pressing cancel only closes the it.</div>
<div>
</div><div>I do not want simply ignore the response because I have a "success" callback that does some heavy manipulation of the response HTML that I'd like to prevent from running when the user cancels.</div>
<div>
</div><div>Any help would be appreciated. Thanks!<br clear="all">
--
Hector
</div>