Welcome, Guest Login

Support Center

JavaScript in an HTML Block

Last Updated: Aug 08, 2016 12:55PM EDT
JavaScript in an HTML Block

You can add JavaScript inside an HTML Block
The HTML Block is the WebView component from the respective SDK.

You add JavaScript as you would do in any standard HTML document.

The Tutorial app 'Simple JavaScript' implements a simple 
Click here to install the Simple JavaScript Tutorial app in your workspace.

JS Code
This is the code from the Simple JavaScript App Tutorial.
That code is in the HTML Block of your Tutorial App.

<!DOCTYPE html>

function myFunction() {
    document.getElementById("demo").innerHTML = "Paragraph changed.";



<h1>My Web Page</h1>

<p id="demo">A Paragraph</p>

<button type="button" onclick="myFunction()">Try it</button>


Learn More
Display a Web Page
- Use JavaScript to build a CheckBoxes UI
Exchange Variables between EachScape and your JavaScript code 

Help us improve! Rate this article:

Yes I found this article helpful

Ask a Question   

seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found