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>
<html>

<head>
<script>
function myFunction() {
    document.getElementById("demo").innerHTML = "Paragraph changed.";
}

</script>
</head>

<body>

<h1>My Web Page</h1>

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

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

</body>
</html>


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   

support@eachscape.com
http://assets1.desk.com/
false
eachscape
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete