# Simple js Functions

## Page Reload

Reloading a page is as simple as;

```javascript
reload();
```

## Redirecting

To redirect a user to another page on the same tab;

```javascript
redirect(url);
```

#### Arguments

| Parameter | Required | Type     | Description             |
| --------- | -------- | -------- | ----------------------- |
| url       | Yes      | `string` | The URL to redirect to. |

## Open New Tab

To open a new tab;

```javascript
open(url);
```

#### Arguments

| Parameter | Required | Type     | Description                 |
| --------- | -------- | -------- | --------------------------- |
| url       | Yes      | `string` | The URL to open on new tab. |

## Console Log

To print on the console log, simply use the function below;

```javascript
log(data);
```

#### Arguments

| Parameter | Required | Type          | Description                   |
| --------- | -------- | ------------- | ----------------------------- |
| data      | Yes      | Any Data Type | The data to print on console. |

## Console Error

To print an error on console, use the function below;

```javascript
error(data);
```

#### Arguments

| Parameter | Required | Type          | Description                    |
| --------- | -------- | ------------- | ------------------------------ |
| data      | Yes      | Any data Type | The error to print on console. |


---

# 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://simcycreative.gitbook.io/signer/interaction-functions/simple-js-functions.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.
