Javascript

Use this Action to directly execute some Javascript.

panels-action-javascript.png  

The javascript can have multiple lines. SWiSH will automatically 'escape' the blanks and newlines etc, prepends "javascript:", and appends ";void(0);" before sending it to the browser. This means you only have to include the actual javascript code itself.

Note: When playing within SWiSH or within a stand-alone player, Javascript actions are not performed.

In the example below, the browser will call the specified JavaScript code to display the message "Hello World" in a dialog box when the mouse button is pressed inside the current object.

panels-action-javascript-example.png  


[Previous] [Main] [Next]