dlangschied
Technical User
Hello!
I have been struggling to find an answer to this issue.
I have an HTA application that has some buttons that create output to the page as html. I have it working, but every time a press a button the it is appended to the existing data. I am using appendchild, but I was really looking to create a new node or remove the old node at the top. My example below is my latest attempt that fails with "Could not complete the operation due to error 800a01b6." I hope someone can help!
<div id="nav">
<table>
<tr>
<td>
<INPUT TYPE="button" NAME="Customer" VALUE="Add Customer" id='AddCustomer' onclick=AddCustomer() width="175" style="width: 175px">
</td>
.
.
.
.
.
Sub AddCustomer
For Each oDiv in data
RemoveNode
Next
set oDiv = document.createElement("div")
addcust = "<TABLE COLSPAN=200 CELLPADDING=1 BORDER=0 WIDTH=500>"
addcust = addcust & "<tr>"
addcust = addcust & "<TD colspan=2 VALIGN=TOP BGCOLOR='#800000'>"
addcust = addcust & "<FONT STYLE='ARIAL NARROW' COLOR='#ffffff' SIZE=2>Customer Data</font>"
addcust = addcust & "</td>"
.
.
.
.
.
.
.
.
addcust = addcust & "</td>"
addcust = addcust & "</tr>"
addcust = addcust & "</table>"
oDiv.innerHTML = addcust
data.appendChild oDiv
End Sub
I have been struggling to find an answer to this issue.
I have an HTA application that has some buttons that create output to the page as html. I have it working, but every time a press a button the it is appended to the existing data. I am using appendchild, but I was really looking to create a new node or remove the old node at the top. My example below is my latest attempt that fails with "Could not complete the operation due to error 800a01b6." I hope someone can help!
<div id="nav">
<table>
<tr>
<td>
<INPUT TYPE="button" NAME="Customer" VALUE="Add Customer" id='AddCustomer' onclick=AddCustomer() width="175" style="width: 175px">
</td>
.
.
.
.
.
Sub AddCustomer
For Each oDiv in data
RemoveNode
Next
set oDiv = document.createElement("div")
addcust = "<TABLE COLSPAN=200 CELLPADDING=1 BORDER=0 WIDTH=500>"
addcust = addcust & "<tr>"
addcust = addcust & "<TD colspan=2 VALIGN=TOP BGCOLOR='#800000'>"
addcust = addcust & "<FONT STYLE='ARIAL NARROW' COLOR='#ffffff' SIZE=2>Customer Data</font>"
addcust = addcust & "</td>"
.
.
.
.
.
.
.
.
addcust = addcust & "</td>"
addcust = addcust & "</tr>"
addcust = addcust & "</table>"
oDiv.innerHTML = addcust
data.appendChild oDiv
End Sub