Today, we faced similar issue with createElement. This issue is also again related to IE.
Find below the sample code which will create a new button. A function "showmsg" should be called on clicking the new button.
The above code worked fine in FireFox. But it didn't work in IE.
Once after searching the internet we found below workaround for resolving this issue.
Instead of using setAttribute for onclick event, we used below code.
Once after making the above change the code is working fine in both IE and FireFox.