Subj : Re: [Q] two names for the same Object To : netscape.public.mozilla.jseng From : gfloria@tcpsi.es (gonzalo) Date : Mon May 12 2003 02:17 am CORRECTION for the orinigal post: We are using RHINO 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 (RHINO) 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 .