Having given up on trying to get IE6 to add innerHTML containing additional elements, I am now creating each element and adding it to the DOM manually. One of the elements needs to take an onkeyup event which then calls the JS and runs an AJAX call. When dynamically generating the original source HTML using PHP the HTML looks like this. <input type="text" name = "name_2" id = "name_2" size=20 onkeyup="fn_getCustomerInfo(2);"/> HTML: Where the 2 is passed through the ajax call to determine the target of the results and is therefore different on each line. I can set the type, name and id in JS using elementobj.name = 'name_' + nextcounter; elementobj.id = 'name_' + nextcounter elementobj.size='20'; Code (markup): how do I set the onkeyup event handler?