Hi, I'm not sure if this is the right area to post this but here goes ......
I am using MSXML.DOMDocument on server side to build up a string containing html code. I am then
writing this out in the <body> of my asp page. All works fine unless I try to use a loop to write an array of text boxes .... and then I get this ....
Microsoft JScript runtime error '800a138f'
'item(...)' is null or not an object
A simplified version of my code is as follows;
transaction_xml = new ActiveXObject("MSXML.DOMDocument");
transaction_xml.async = false;
var toplink = '<table border = "1" cellpadding = "0" cellspacing = "0">';
toplink += '<tr><td>';
var counter = 1;
toplink += transaction_xml.getElementsByTagName("package" + i).item(0)firstChild.nodeValue;
toplink += '<br><img name = "counter' + counter + '" src = "../images/select_off.gif"
onMouseOver = ChangeImage(this); onMouseOut = ChangeImage(this);
onclick="submitform(' + counter + ')"><BR><img src = "../images/spacer.gif"
width = "0" height = "10">';
// If this loop is left out .... no errors
toplink += '<input type ="text" name="package' + counter + '" value = ""><BR>';
toplink += '</td></tr></table>';
I have tried to extract a portion of the table I am trying to build up so if there appear to be mistakes in the html code, it is probably as a result of this.
I write this out in the <body> of my asp page like this ...
Hope someone can help ... I'm new to using xml and msxml dom ... and so am more than happy to up the points if this is a more difficult question than 250 points.