# Callbacks

{% hint style="info" %}
To use the Web SDK please [install ](/how-to-install.md)the snippet first.
{% endhint %}

| Action           | Description                                                                          | Example                                                                            | Data                                     |
| ---------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- | ---------------------------------------- |
| Initialize       | Triggers when GetComplied is initialized                                             | `getComplied.callback.oninit = function(){ /* your code goes here */ }`            |                                          |
| Load             | Triggers when GetComplied loads documents and user permissions                       | `getComplied.callback.onload = function(data){ /* your code goes here */ }`        | Consents list                            |
| Open             | Triggers when GetComplied is openned                                                 | `getComplied.callback.onopen = function(){ /* your code goes here */ }`            |                                          |
| Close            | Triggers when GetComplied is closed                                                  | `getComplied.callback.onclose = function(){ /* your code goes here */ }`           |                                          |
| Language change  | Triggers when user changes language                                                  | `getComplied.callback.onlangchange = function(data){ /* your code goes here */ }`  | language code ("en-GB", "pt-PT"...)      |
| Save             | Triggers when user approves consents                                                 | `getComplied.callback.onsave = function(data){ /* your code goes here */ }`        | Consents list                            |
| Input initialize | Triggers when an input is initialized                                                | `getComplied.callback.oninputinit = function(data){ /* your code goes here */ }`   | InputName                                |
| Input change     | Triggers when user changes his consent                                               | `getComplied.callback.oninputchange = function(data){ /* your code goes here */ }` | <p>InputName<br>Value (true / false)</p> |
| Input lock       | Triggers when submit button after submission input should or should not be disabled. | `getComplied.callback.oninputlock = function(data){ /* your code goes here */ }`   | <p>InputName<br>Lock (true / false)</p>  |


---

# 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.getcomplied.com/web-sdk/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.
