Shawn,

> Sample Code - Class definition:
> 
>       function MyObjectAddObject(oObject) {
>               var oNewObj = new SubObject();

Where is SubObject() declared? Is it in both the pop-up window and the main
window?

>               //methods
>               this.AddObject = MyObjectAddObject();
Change this line to:
        this.AddObject = MyObjectAddObject();

The way you have AddObject declared at the moment, it's executing the
MyObjectAddObject() function and return the value. Remove the parenthesis to
create a reference to the function.

> Sample Code - Popup Window
> 
>       <script>
>               var oMyObjRef = window.opener.oMyObject;
>               var oLocalObj = new SubObj();

I think I'd invoke the SubObj() function from the main window (I'm assuming
this is supposed to be the same as SubObject(). If you're not declaring all
the objects from same window/namespace, you'll have problems. You can do
this by invoking oLocalObj as:

Var oLocalObj = new window.SubObject();



Hopefully that helps. I've had very mixed results w/various browsers sharing
custom objects between various window objects. The way that I've found to be
the most successful is to actually invoking all your objects in one window
object--this seems to work best. 

Once you've got the objects declared, you can then create a reference to the
object and that seems to work. The thing to watch out for is object clean
up. If you're declaring all your objects in the main window, then they'll
still existing after closing the window, unless you manually do some
unregistering of the objects in the pop-up windows onUnload event.

-Dan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to