The DOMCreate function creates a new DOM element and inserts it into the DOM.
Syntax | |||||
DOMCreate(ByVal ElementTag As String, ByVal ElementID As String, ByVal ParentID As String, ByVal Class As String, ByVal style As String) | |||||
Return value | |||||
Type |
Description | ||||
Long |
0 if successful | ||||
Parameter | |||||
Use |
Name |
Type |
Passing |
Description | |
Required |
ElementTag |
String |
ByVal |
Tag name of the new element, e.g. DIV or LABEL or TABLE | |
Required |
ElementID |
String |
ByVal |
The identifier of the new element | |
Required |
ParentID |
String |
ByVal |
The identifier of the parent or an empty string for the top level | |
Optional |
Class |
String |
ByVal |
The CSS class name or space-separated class names | |
Optional |
style |
String |
ByVal |
The CSS styles of the new element | |
Example:
A new element of the type LABEL with the ID LB is created at the top level in the DOM (as a child of BODY). After that, the inner HTML is written for this new element.
Client.WebClient.DOMCreate("LABEL", "LB", "")
Client.WebClient.DOMInnerHTML("LB") := "New label"