Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Callback after an attribute is modified


Callback after an attribute is modified

Hi all.

I need to use an attribute value to trigger an action.
In ACL, the modify_tag callback is called before a "Modify Attributes"
dialog box is opened.
What I need is to call a function after an attribute is modified.

Any thoughts?


Pierre Chateil
LCI TechPub Sud-ouest


You can do this with an attribute rule, or <att> in an Arbortext FOSI. See help 22.

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 =;
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!");

var doc = Application.activeDocument;
// define an object with the required handleEvent method
var o = { handleEvent: attrEvent };
var listener =;
doc.addEventListener("DOMAttrModified", listener, true);



Clay Helberg
Senior Consultant

John Sillari
Chief Technologist
Technical Services Division
Dayton T. Brown, Inc.

Top Tags