Subj : Object properties that dont yet exist? To : netscape.public.mozilla.jseng From : genisiob@pilot.msu.edu (Brian) Date : Tue Oct 07 2003 08:19 am Hello all, In Mozilla, if I run the following script, it works: document.somejunk = 5; alert(document.somejunk); How does this work? The somejunk property of document surely was not defined in their model, yet the variable obviously gets added as a property of document for access. I am implementing a javascript model where I want the same thing to happen... I want to have access to properties that I have not explicitly defined. Now, if my object is something like this: Foo = { int junk; int bar } and a user sets Foo.somejunk, my error handler gets triggered, and the script aborts. Instead, I want to have a catchall for the object, where I can store somejunk as a property. Likewise, I want to catch somejunk as a property when it is being accessed, look up the value, and return it... much like the browser does. How is this done? Thanks, Brian .