# Codes

Using code snippet elements, you can publish JavaScript snippets on the client side. These snippets will be fetched from the same first-party server as the JENTIS JS SDK as a single JavaScript resource.

Please be aware that with those custom codes:

1. **Code Elements execute by default on the "JENTIS Framework Load" trigger, which** means whenever JENTIS is initiated on your website.
2. **Code snippets are executed one by one.** Prioritizing all those code elements is possible if a sequence is required. Use the "order" field property in a code element. The order of code snippets is from low to high numbers (Integer)
3. **No HTML.** The field "Javascript Code" only allows the use of Javascript, please do not enter HTML (like "\<script>...\</script>" - do not use this).


---

# 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.jentis.com/jentis-dcp-elements/codes.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.
