I want to add a listener inside of the img tag.
'<div id="111" style="height:20px; width:49.9%; float:left">'+
'<span style="float: right; margin-right: 25px; margin-top: 4px;">'+
'<img id= "',
downloadLeft_,'" style="position:absolute;" src="/public/images/excel.gif"></span></div>'
goog.events.listen(goog.dom.getElement(downloadLeft_), goog.events.EventType.CLICK, function() {
});
So I get the img id and put it into goog.events.listen. However I got
goog.dom.getElement(downloadLeft_) is null. Why the getElement is null? how can I add listener inside of img tag?