# HTML Execute JScript

This action executes Java Script code in the currently loaded page.

Action available for the following operating systems:

![](/files/-MIiA-ixsOr4jYdDIieF)

### Parameters

* **HTML Control** *\<unquoted string> -* The HTML control to execute the javascript code in.
* **JScript** *\<string> -* The JavaScript code to execute and to be evaluated if a return value is required.
* **Target** \<string> - The target control or variable to store the return string of the javascript code executed. The returned value must be a string. If you do not require a return value or the function executed does not have a return value, than you should leave this parameter empty, so Kalipso does not try to retrieve a return value from the execution. On some KClients trying to retrieve a return value from a function that does not return anything, can originate an Error to be triggered on the execution.

{% hint style="info" %}
This should be equivalent to executing the code inside javascript "eval()" function and the returned value the same as would be returned by that function.
{% endhint %}

{% hint style="info" %}
Your script should only contain single quotes, not double quotes.

If you really need to use double quotes, then you cannot use single quotes anywhere in your script.

Sending a script that uses both single quotes and double quotes will result in undetermined behavior.
{% endhint %}


---

# 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://doc.sysdevmobile.com/kalipso5/developing/form/actions/actions-description/group-controls/html-execute-jscript.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.
