Hi Pierre--
I'm not sure how you'd do that in ACL, but it's not very hard in AOM, if
you are comfortable with Java or JavaScript. You can attach an event
listener to the document object that listens for DOMAttrModified events,
and (after checking the element and attribute names) does whatever you
need done.
It would be something like this, in an editinit file (using the default
Rhino JavaScript flavor):
// *** untested code, debugging is left as a exercise ***
function attrEvent(event)
{
var node = event.target;
var attrname = event.relatedNode.nodeName;
if ((node.nodeName == "{target-node}") && (attrname ==
"{target-attr}")) {
Application.alert("Hey! You modified an " + attrname + " attribute
on a " + node.nodeName + " element!");
event.stopPropagation();
}
}
var doc = Application.activeDocument;
// define an object with the required handleEvent method
var o = { handleEvent: attrEvent };
var listener = Packages.org.w3c.dom.events.EventListener(o);
doc.addEventListener("DOMAttrModified", listener, true);
HTH.
--Clay
Clay Helberg
Senior Consultant
TerraXML