HTML: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Line 5: Line 5:
== Description ==
== Description ==


The HTML statement allows you to ember pure HTML in your ap. This allows you to have additional functionality to your app. Statements within this block must follow all HTML rules. They are ignored by App Studio itself. For more information, see the Tech Note ‘The role of JavaScript and WebKit’.
The HTML statement allows you to embed pure HTML in your app. This allows you to have additional functionality to your app. Statements within this block must follow all HTML rules. They are ignored by App Studio itself. For more information, see the Tech Note ‘The role of JavaScript, HTML5 and WebKit’.


It will be subject to all the regular rules of page formatting. If some other element is on top of it, it will not be visible. The z-index property can be used to change the hierarchy of where the element gets drawn.
It will be subject to all the regular rules of page formatting. If some other element is on top of it, it will not be visible. The z-index property can be used to change the hierarchy of where the element gets drawn.

Revision as of 22:52, 5 October 2013

HTML

[statements]

End HTML

Description

The HTML statement allows you to embed pure HTML in your app. This allows you to have additional functionality to your app. Statements within this block must follow all HTML rules. They are ignored by App Studio itself. For more information, see the Tech Note ‘The role of JavaScript, HTML5 and WebKit’.

It will be subject to all the regular rules of page formatting. If some other element is on top of it, it will not be visible. The z-index property can be used to change the hierarchy of where the element gets drawn.

Example (Basic)

'This sample shows how to add a button at runtime.
 
HTML 
  <button onmousedown="button1()">Button 1</button>
  <div id="box">Box</div>
End HTML 

Sub Main()
  'Hide the form, otherwise our elements will hidden by it
  Form1.hide()
End Sub
 
Function button1()
  box.innerHTML= event.screenX & ", " & event.screenY
End Function

Example (JavaScript)

// This sample shows how to add a button at runtime.
 
HTML 
  <button onmousedown="button1()">Button 1</button>
  <div id="box">Box</div>
End HTML 

function Main(){
  'Hide the form, otherwise our elements will hidden by it
  Form1.hide();
}
 
function button1() {
  box.innerHTML = event.screenX + ", " + event.screenY;
}

Output

(a button and a box are displayed. Click the button and text is put in the box)

Related Items

JavaScript