dxo.CellClick.AddHandler(function(s, e) {
alert(s);
alert(event);
ChangeBackColor( event.srcElement,e.RowValue,e.ColumnValue,'ROUND');
});
I have to add event but unable to make it work. Works in chrome and IE.. but not in FF
alert-> for s ->Object object
alert-> for event -> Object MouseEvent in chrome and FF -> nothing.. console shows event not defined.
In IE,
eventis a global variable (a property ofwindow) which is set prior to a JavaScript event firing. This is non-standard behavior that Chrome emulates to be friendly to sites designed for IE. Firefox doesn’t emulate this non-standard behavior.The standard behavior is that the
eventobject is passed into the event handler as an argument. You’ll need to find that argument in whatever middle layer you’re using (you haven’t said, and I’m not immediately recognizing it), and use that instead. (Perhaps it’s the function’seargument? Or some property of theeobject? Or thesargument or some property of it?)Also note that
srcElementis specific to IE; you’ll want to check for eithersrcElementortarget(again, the standard form).(Lest you think I’m bashing Microsoft here: IE’s non-standard forms actually predate the standard ones — e.g., they’re the ones who moved on from the old DOM0 stuff first. But it would have been nice if they’d supported the standard forms within the first 10 years of the standard.)