Vlaad
05-15-2003, 02:22 AM
Hello People!
I'm having some trouble with a little bit of javascript. Surprise, surprise!
var tr = document.createElement('tr');
var producttd = document.createElement('td');
producttd.innerHTML = '<input name="ProductID'+rowCounter+'" type="hidden" id="ProductID'+rowCounter+'" value="">';
var rfqtd = document.createElement('td');
rfqtd.innerHTML = '<input name="RFQNumber'+rowCounter+'" readonly type="text" class="text" id="RFQNumber'+rowCounter+'" size="25" onClick="javascript:window.open(\'rfqselection.asp?row='+rowCounter+'&pid='+document.getElementById('ProductID'+rowCounter).value+rowCounter+'\',\'rfqselector\',\'height= 300,width=200,toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no\'); return false;">';
tr.appendChild(producttd);
tr.appendChild(rfqtd);
There's more in the row, but here's the general idea. And yea, I know I probably should have made it more elegant by not using the innerHTML dodge-up, but I'm working to a deadline here, and I really don't see the point of adding an extra 30 lines of code (there's heaps more cells besides these two, but nevermind those).
Now... the error:
document.getElemenyById("ProductID"+rowCounter) has no properties.
Internet Explorer displays a lovely non-informative line of dribble.
Please help me get through this problem ASAP... it's freaking killing me!!!
Cheers in advance,
Vlaad
I'm having some trouble with a little bit of javascript. Surprise, surprise!
var tr = document.createElement('tr');
var producttd = document.createElement('td');
producttd.innerHTML = '<input name="ProductID'+rowCounter+'" type="hidden" id="ProductID'+rowCounter+'" value="">';
var rfqtd = document.createElement('td');
rfqtd.innerHTML = '<input name="RFQNumber'+rowCounter+'" readonly type="text" class="text" id="RFQNumber'+rowCounter+'" size="25" onClick="javascript:window.open(\'rfqselection.asp?row='+rowCounter+'&pid='+document.getElementById('ProductID'+rowCounter).value+rowCounter+'\',\'rfqselector\',\'height= 300,width=200,toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no\'); return false;">';
tr.appendChild(producttd);
tr.appendChild(rfqtd);
There's more in the row, but here's the general idea. And yea, I know I probably should have made it more elegant by not using the innerHTML dodge-up, but I'm working to a deadline here, and I really don't see the point of adding an extra 30 lines of code (there's heaps more cells besides these two, but nevermind those).
Now... the error:
document.getElemenyById("ProductID"+rowCounter) has no properties.
Internet Explorer displays a lovely non-informative line of dribble.
Please help me get through this problem ASAP... it's freaking killing me!!!
Cheers in advance,
Vlaad