S
Steve
Hi all,
In Mozilla & other browsers, I can listen for a DOMNodeInserted (or
other modification) events but of course IE doesn't support this.
I need a method to catch when a node is added to the DOM in IE
(by .innerHTML, .appendChild(), or .insertBefore() ) and I am okay
with proprietary hacks.
I tried document.all (or similar) but it doesn't update with
JavaScript changes after page load. (e.g. putting an onpropertychange
won't work)
I also tried a clever CSS/HTC trick, using the "*" selector, that
triggered a behavior, that fired an event, and this worked just
great!... but this loaded the behavior HTC file for *EVERY* DOM Node,
and it appears in the status bar as 100's and 100's of external file
loads (read: slow and painful).
Finally, I tried using a "*.someClass" selector or
"ElementType.someClass" selector, but these won't trigger the magic
above to catch new elements added to the DOM.
I would prototype something on Element, or HTMLElement, but of course
that won't work in IE either!
Are there any JavaScript Guru's out there that have determined an
elegant solution to this?
If it helps any, it only has to work in IE6.... I can live with it not
working in IE7.
TIA
In Mozilla & other browsers, I can listen for a DOMNodeInserted (or
other modification) events but of course IE doesn't support this.
I need a method to catch when a node is added to the DOM in IE
(by .innerHTML, .appendChild(), or .insertBefore() ) and I am okay
with proprietary hacks.
I tried document.all (or similar) but it doesn't update with
JavaScript changes after page load. (e.g. putting an onpropertychange
won't work)
I also tried a clever CSS/HTC trick, using the "*" selector, that
triggered a behavior, that fired an event, and this worked just
great!... but this loaded the behavior HTC file for *EVERY* DOM Node,
and it appears in the status bar as 100's and 100's of external file
loads (read: slow and painful).
Finally, I tried using a "*.someClass" selector or
"ElementType.someClass" selector, but these won't trigger the magic
above to catch new elements added to the DOM.
I would prototype something on Element, or HTMLElement, but of course
that won't work in IE either!
Are there any JavaScript Guru's out there that have determined an
elegant solution to this?
If it helps any, it only has to work in IE6.... I can live with it not
working in IE7.
TIA