# openlink

## Description

Opens a link in a new tab in a mobile web browser.

## Input / Parameter

| Name | Description            | Input Type  | Default | Options | Required |
| ---- | ---------------------- | ----------- | ------- | ------- | -------- |
| link | The link to be opened. | String/Text | -       | -       | Yes      |

## Output

| Description                        | Output Type |
| ---------------------------------- | ----------- |
| Returns the formatted information. | Object      |

### Object

| Key     | Description                                                             | Output Type |
| ------- | ----------------------------------------------------------------------- | ----------- |
| success | Boolean value to denote whether the function was executed successfully. | Text        |
| message | The message to print.                                                   | Text        |
| data    | Any additional message or data to print.                                | Text        |

## Example

In this example, we will use the `App.reload` function to open the link for the eMOBIQ dashboard in another tab.

### Steps

1. Drag a button component to the canvas and click on the 'Action' tab.
2. Drag the `App.openlink` function to the event flow under the 'press' event.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-f6f09050014b83a43483942237810b0757a04c80%2Fopenlink-step-1.png?alt=media)
3. Under the inspector of the component, enter the link you want to open. In this example, we are using `https://main.emobiq.com/`, the link to the eMOBIQ dashboard.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-5315d6731e4d33ca4248e3de0a527a4e4cccf66a%2Fopenlink-step-2.png?alt=media)

### Result

1. Save and preview the app.
2. Click the button to open the dashboard in another tab.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-b9f5836d1494cc819ed13e2fd93c3435695089bd%2Fopenlink-result-1.gif?alt=media)
