In my IE BHO I create a input button element using:
var button = doc.createElement("input");
button.setAttribute("value", "myButton"); //next line gets an error
button.addEventListener("click", openFunction, false); //openFunction is a function inside of the same class
When I try to call button.addEventListener I get a ‘mshtml.IHTMLElement’ does not contain a definition for ‘addEventListener’ error. I find this odd because according to this site (http://help.dottoro.com/ljeuqqoq.php) I should be in the clear.
I also saw this thread but it seems like overkill for what I’m trying to do and I can’t get it to work.
Finally got it to work. Had to use similar method to the thread I linked in original question.
Inside my OnDocumentComplete method (also in same namespace as above [extra info for novices]):
A lot of work just to get a button to click. In firefox it was one line :O