< Back

Contents

Script Output

Script can generate output (HTML, Text, Tables) to give results or create custom user interfaces.

HTML

For formatted output or custom UIs (can contain CSS, JS):

HTML.css("h2 { font-size: 18px; }");

HTML.add("<h1>Our Meeting</h1>");
HTML.add("Content: Find new solutions");

This will set the style * { font-family: Arial; } and add page content: <h1>Our Meeting</h1>, Content: Find new solutions.

Or (same result):

System.out.print("Some Text");
System.out.println("<p>My Paragraph");
out.append("Some Text");

Text

For output in a Textarea:

OUTPUT.text("some-text");
OUTPUT.text("\n");
OUTPUT.text("second line");

Table

Shows result in a table, where the cell content is specified.

// Header Row
OUTPUT.header(0, "Name");
OUTPUT.header(1, "Age");

// Data Row
// Parameters: Row, Column, Value
OUTPUT.table(0, 0, "John");
OUTPUT.table(0, 1, "35");

// Data Row
OUTPUT.table(1, 0, "Susan");
OUTPUT.table(1, 1, "32");

Will generate a table like:

NameAge
John35
Susan32