I checked out the W3C site, and looked at the DOM2 specification (particularly: org/w3c/dom/html2/HTMLInputElement.java) because my x.setAttribute('onClick','myFunction') doesn't work for me.
I was hoping there'd be an x.onClick='myFunction' method, but there's not.
I thought I'd be clever and try translating it back to partial rubbish-code and use the x.innerHTML='...' method, but I get "unspecified" errors in both IE and Moz.
x = document.createElement('input');
x.innerHTML="class='text' type='text' name='MarginCalculator"+rowCounter+"' id='MarginCalculator"+rowCounter+"' readonly onClick='javascript: myFunction'";
myFunction is blank, and all the quotes are in the correct positions... the code seems sound. I've had it running before by writing out the entire input tag in pure HTML using innerHTML= within a td. However, I do NOT want to have to do such an ugly thing.
Please... this really needs to be fixed ASAP, or I'm gunna get reamed!