---
title: onload
framework: tvmljs
role: symbol
role_heading: Instance Property
path: tvmljs/xmlhttprequest/1627316-onload
---

# onload

A callback function that is called when the request is successfully completed.

## Declaration

```data
attribute function onload;
```

## Discussion

Discussion This attribute must be set to a function; for example, XMLHttpRequest.onload = function () {}.

## See Also

### Implementing Callback Functions

- [onabort](tvmljs/xmlhttprequest/1627410-onabort.md)
- [onerror](tvmljs/xmlhttprequest/1627328-onerror.md)
- [onloadend](tvmljs/xmlhttprequest/1627365-onloadend.md)
- [onloadstart](tvmljs/xmlhttprequest/1627440-onloadstart.md)
- [onreadystatechange](tvmljs/xmlhttprequest/1627414-onreadystatechange.md)
- [ontimeout](tvmljs/xmlhttprequest/1627321-ontimeout.md)
