Hi lads,
here's my page. My.xsl generates textboxes to write text into elements in my.xml. When I click Add row-button it adds a new row (of textboxes) but also wipes all the text I have put in textboxes. Why?
<XML ID=xDoc SRC="my.xml"></XML>
<XML ID=xStyle SRC="my.xsl"></XML>
<SCRIPT language=vbscript>
Sub Window_onLoad
xHTML = xDoc.transformNode(xStyle.XMLDocument)
CONTAINER.innerHTML = xHTML
End Sub
Sub Add()
set root = xDoc.documentElement
set curr_node = root.lastChild
set new_node = curr_node.cloneNode(true)
root.appendChild(new_node)
xHTML = xDoc.transformNode(xStyle.XMLDocument)
CONTAINER.innerHTML = xHTML
End Sub
</SCRIPT>
<body>
<div ID="CONTAINER"></div>
<INPUT TYPE=BUTTON VALUE='Add row' ONCLICK="VBSCRIPT:Add()" >
</body>
here's my page. My.xsl generates textboxes to write text into elements in my.xml. When I click Add row-button it adds a new row (of textboxes) but also wipes all the text I have put in textboxes. Why?
<XML ID=xDoc SRC="my.xml"></XML>
<XML ID=xStyle SRC="my.xsl"></XML>
<SCRIPT language=vbscript>
Sub Window_onLoad
xHTML = xDoc.transformNode(xStyle.XMLDocument)
CONTAINER.innerHTML = xHTML
End Sub
Sub Add()
set root = xDoc.documentElement
set curr_node = root.lastChild
set new_node = curr_node.cloneNode(true)
root.appendChild(new_node)
xHTML = xDoc.transformNode(xStyle.XMLDocument)
CONTAINER.innerHTML = xHTML
End Sub
</SCRIPT>
<body>
<div ID="CONTAINER"></div>
<INPUT TYPE=BUTTON VALUE='Add row' ONCLICK="VBSCRIPT:Add()" >
</body>