ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / HTML file functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Adds a child at the start of the children of the current node in an HTML document.
Example
hDoc is htmlDocument = "
<html>
<head/>
<body>
<h2><span>
<p>Text</p>
</span></h2><h3></h3>
</body>
</html>
"
 
hNode is htmlNode
// body: <div id="div"><p>Text</p></div>
hNodeInsert is htmlNode
 
 
hSearchNode is array of htmlNode <- hDoc.FindElementByTag("h3")
hNode <- hSearchNode[1]
hNodeInsert..TagName = "div"
hNode.InsertFirstChild(hNodeInsert)
// body: <h1/><h2><span><p>Text</p></span></h2><h3><div/></h3>
hNodeInsert..TagName = "span"
hNode.InsertLastChild(hNodeInsert)
// body: <h1/><h2><span><p>Text</p></span></h2><h3><div/><span/></h3>
Trace(hDoc)
Syntax
<Source node>.InsertFirstChild(<Node to insert>)
<Source node>: htmlNode variable
Name of the htmlNode variable that corresponds to the insert reference node.
<Node to insert>: htmlNode variable
Name of the htmlNode variable that corresponds to the child to be inserted as first child of the <Source node>.
Business / UI classification: Business Logic
Component: wd300html.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help