# Canceling an XML Load

**URL:** <https://forum.kirupa.com/t/canceling-an-xml-load/274515>\
**Category:** flash\
**Created:** [October 30, 2008, 9:05pm UTC](https://forum.kirupa.com/t/canceling-an-xml-load/274515 "2008-10-30T21:05:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jazgold](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@jazgold](https://forum.kirupa.com/u/jazgold)\
**Post date:** [October 30, 2008, 9:05pm UTC](https://forum.kirupa.com/t/canceling-an-xml-load/274515/1 "2008-10-30T21:05:30Z")

</div>

when I load data into an XML object:

```auto
var xml = new XML();
xml.load( "someXmlsource" )

```

is there a way to cancel the load?

let’s say i had a button that when clicked caused the data to load into the xml object. i’m assuming i could always delete the object, but if clicking the button again before the onLoad comes back recreates the xml object, will the onLoad catch both calls or just the second one?

i wish there were simply a .cancelLoad() function

any ideas on how to handle this?
