need some help with DOM

Results 1 to 3 of 3

Thread: need some help with DOM

  1. #1
    Join Date
    Dec 1969

    Default need some help with DOM

    given the following code<BR><BR>&#060;head&#062;<BR>.<BR>.<BR>the following is in a function<BR>var report = document.getElementById("tblreport");<BR>var reportBody = document.createElement("TBODY");<BR>var newReportRow = document.createElement("TR");<BR>var newItemCol = document.createElement("TD");<BR>var colData = document.createTextNode(arrItemNumber[indexfound]);<BR>newItemCol.appendChild(colData);<BR>newRepor tRow.appendChild(newItemCol);<BR>reportBody.append Child(newReportRow);<BR>report.appendChild(reportB ody);<BR>document.location.reload();<BR>the function ends<BR>.<BR>.<BR>&#060;/head&#062;<BR><BR>&#060;body&#062;<BR>.<BR>.<BR>&# 060;table id="tblreport"&#062;<BR>the THEAD has anchors to call the function above<BR>&#060;/table&#062;<BR>.<BR>.<BR>&#060;/body&#062;<BR><BR>and the fact that<BR>arrItemNumber[indexfound] = 0;<BR>I should get a row in the TBODY with a tablecell with one tablerow with a 0 in it.<BR>But I&#039;m getting nothing.<BR><BR>I know the function is being called - I tested it with alerts

  2. #2
    Join Date
    Dec 1969

    Default RE: need some help with DOM

    Why do you have a document.location.reload() in there?<BR><BR>I don&#039;t tend to script the DOM much, but the rest of it looks fine.<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969

    Default I agree...

    &nbsp;<BR>I would expect document.location.reload() to wipe out everything you just did.<BR><BR>That&#039;s what the docs way will happen:<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts