Reputation: 101
I have a div element that is dynamically changed based on the current state of a jquery data table. For example when filtered it shows "Showing 1 to 100 of 145 entries (filtered from 1,064 total entries)".
Based on the way one of the tables is loaded the 1,064 is misleading as while the records returned are 1,064 the records have been divided by groups so the most you would see is is something like 266, so "Showing 1 to 100 of 145 entries (filtered from 266 total entries)".
The reason why all 1,064 are needed and not just the one group is you can switch between groups and it does this by filtering on the group number column.
Because of the misleading number i have a DOMCharacterDataModified listener that modifies the text in the div to a correct number. the problem is the code that does that is also used for another table that loads the same records but has the ability to view all the groups through some regexp filtering.
Now all this works perfect in chrome, however the DOMCharacterDataModified does not get fired in IE9.
The listener function
function testFunct() {
debugger;
var pause = "";
}
The div.
var doc = document.getElementById("tMain_info");
The listener.
doc.addEventListener("DOMCharacterDataModified", testFunct);
Also tried.
doc.attachEvent("DOMCharacterDataModified", testFunct);
But that didn't work as either and caused an error in chrome.
any help is appreciated.
Upvotes: 0
Views: 691
Reputation: 160
It appears that per Microsoft a lot of Mutation Events no longer fire in IE9 and later. That is if the DocumentMode is IE9 or Later DOMCharacterDataModified won't fire up.
I am developing an IE11 BHO myself and I have observed that some mutation events such as DOMCharacterDataModified are not firing. check out the link.
It appears that you are suppose to use Mutation Event Observers instead. checkout the link2 IE Event Technical Specs
Migrating From Mutation Events to Mutation Event Observers.
Upvotes: 1