I'm having a bitch of a time finding anything via google that directly
addressed the following..

One of my Tapestry pages has a <frameset> with one frame. The content
of that frame is static content delivered by another company. There is
an agreed upon standard between us and them that the static content
(rife with javascript) will walk up the tree of windows until it finds
a variable declared. In our case that's the top most window (the one
containing the Tapestry generated frameset).

Thier code is doing walking up the window tree like this:

function findVar(win)
{
        
        var limit = 500;
        var nParentsSearched = 0;
        
        /*
        Search each parent window until we either:
                 -find the variable,
                 -encounter a window with no parent (parent is null
                                or the same as the current window)
                 -or, have reached our maximum nesting threshold
        */
        while ( (win.VARIABLE == null) &&
                        (win.parent != null) && (win.parent != win) &&
                        (nParentsSearched <= limit)
                  )
        {
                                
                nParentsSearched++;
                win = win.parent;
        }
        
        /*
        If the VARIABLE doesn't exist in the window we stopped looping on,
        then this will return null.
        */
        return win.VARIABLE ;
}

The twist (isn't there always a twist?!) is that the tree is actually
4 levels deep (the static content also uses framesets and  frames).

Works famously in IE 6 (the variable is found and returned) but not at
all in Firefox (the variable is not found and 'undefined' is returned)
. THAT IS THE PROBLEM and the reason I'm spamming the list.

Any Ideas? I assume this is a browser impl issue. Anything more I can
add to make things more clear? Can I wash your car?


Geoff

--
The Spindle guy.           http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:    
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates:            http://spindle.sf.net/updates

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to