# Open A URL On An Event

> Helpful code snippet for opening a URL on an event in Babylon.js.

Source: https://doc.babylonjs.com/toolsAndResources/utilities/OpenUrl

## Open a URL with Action Manager

Since any JavaScript can be called when executing a code action with the action manager, it is straightforward to open a new web page using 

```javascript
window.open(URL)
```
to open a new window or

```javascript
window.location = URL
```
to replace the content of the current window.

- [Playground: Open URL On Single Mesh Click](https://playground.babylonjs.com/#INB624#1)
- [Playground: Open URL On Mesh Click Of Multiple Meshes](https://playground.babylonjs.com/#INB624#2)
