Subj : [Q] two names for the same Object To : netscape.public.mozilla.jseng From : gfloria@tcpsi.es (gonzalo) Date : Thu May 08 2003 04:22 am We are using as a interpreter for JS code found at HTML pages. The problem we face here is that JS allows multiple names for the same object, such as: "button1.name" and "myForm.button1.name" or "document.myForm.button1.name" All expresions reefer to the same object. how can I show this to RHINO. we have processed the DOM model from the HTML document, so before trying the interpretation we provide the context with the appropriate object. For example: ScriptableObject.defineClass(scope, Document.class); Scriptable myDocument = cx.newObject(scope, "Document", null); scope.put("document", scope, myDocument); The problem is that we need the compiler to "understand" the hierarchy and that a given object may have different names. Is there a way to do that? Any ideas on how to solve this problem? thanx in advance. gonso .