# Javascript Callbacks (deprecated)

{% hint style="danger" %} <mark style="color:orange;">Javascript Callbacks are deprecated and have been replaced by events in our</mark> [<mark style="color:orange;">Web SDK</mark>](/technologies/web-and-mobile-sdk/javascript-web-sdk.md)
{% endhint %}

## Introduction <a href="#introduction" id="introduction"></a>

iAdvize provides Javascript callbacks functions that can be used to perform actions on specific events.

Some callbacks have a parameter that contains data specific to the triggered event.

## How to use callbacks <a href="#how-to-use-callbacks" id="how-to-use-callbacks"></a>

To execute custom code during an iAdvize callback function you have to define the callbacks you want to use in a `window.iAdvizeCallbacks` object.

{% hint style="warning" %}
Please note that the `window.iAdvizeCallbacks` must be defined before the main iAdvize tag.
{% endhint %}

## &#x20;<a href="#guides-callbacks" id="guides-callbacks"></a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iadvize.dev/technologies/web-and-mobile-sdk/javascript-callbacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
