sharepoint - JavaScript - browserHandler is undefined -


i´m not javascript dev. sharepoint 2010 site custom code (running on sharepoint 2013) not work correctly. click event on link not working. when i´m using debuger (ie f12) message "browserhandler undefined".

is following code correct?

var browserhandler; if (element.addeventlistener) {     browserhandler = function (e) {         return handler.call(element, new sys.ui.domevent(e));     };     element.addeventlistener(eventname, browserhandler, false); } else if (element.attachevent) {     browserhandler = function () {         var e = {}; //message: browserhandler undefined         try  {             e = sys.ui.domelement._getwindow(element).event;         } catch (ex) {         }         return handler.call(element, new sys.ui.domevent(e));     };     element.attachevent('on' + eventname, browserhandler); } 


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -