oh and the reason it worked in IE and not Firefox? Each interprets the 'domain' rule differently. Jetty is running on localhost:9999, the static content is served from apache on localhost:6666.
IE considers the same domain with different ports to be ok. Firefox does not. I stumbled on the revealing error message in ie when I accidentally opened the tapestry app with 127.0.0.1:9999 which cause IE to break in exactly the same way as Firefox (recall the content is coming from localhost:6666). Geoff On 9/22/05, Geoff Longman <[EMAIL PROTECTED]> wrote: > Solved. calling window.parent or window.top throws an exception > (Permission denied) if the windows come from different domains. In > Firefox the exception message is 'undefined' while IE actually tells > you the problem. > > Thanks for all the suggestions! > > > Geoff > > On 9/22/05, Geoff Longman <[EMAIL PROTECTED]> wrote: > > grr > > > > ---------- Forwarded message ---------- > > From: Geoff Longman <[EMAIL PROTECTED]> > > Date: Sep 22, 2005 8:21 AM > > Subject: Re: [OT] Using javascript to walk up the browser windows. > > To: Jesse Kuhnert <[EMAIL PROTECTED]> > > > > > > On 9/21/05, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > > > The simple answer is probably not going to work for you I'm sure, but I'll > > > shoot anyways. > > > > > > Does window.top not work for you guys? Maybe there is a cross-browser > > > problem with that, but the standard says it should reference the top-most > > > window. It feels icky that they are trying to traverse the tree upwards > > > like > > > that anyways. > > > > window.top would probably work (I'm about to try it) but it's not an > > option for reasons that will become clear. > > > > > > > > Maybe you could change your agreed upon protocol to be that whoever loads > > > the original window wins and gets to hold the variable? Then that method > > > could stop traversing everything and just check window.top.VARIABLE > > > instead. > > > > Even if this works its not the complete solution. The algorithm is an > > industry standard (SCORM). We could agree with this partner but the > > idea is that will the standard in place that partner's content could > > be replaced with content from any partner that implements the > > standard. Obviously algorithm is wrong if it does not work with > > Firefox. If I can isolate the problem and perhaps come up with a > > workaround (like window.top) we can insulate ourselves from any > > reprecussions from the ultimate customer (not our problem). > > > > > > > > A good js debugger like patrick pointed out could help a lot as well. > > > Venkmen is cool and all, but sometimes (esp for things like this) a little > > > debug output would be nice as well. > > > > I have Venkman. Debugging js is like herding drunken cats! > > > > > > > > http://www.alistapart.com/articles/jslogging > > > > > > That guy is good at writing the debug statements right onto your browser > > > pages. > > > > Something I will investigate. Thanks. > > > > > > > > If all else fails you can try doing some sort of javascript initiated IO > > > request/response logic to share data between servers? Seems overly > > > complicated... > > > > Not an option really, the content is static. > > > > > > > > j > > > > > > On 9/21/05, Geoff Longman <[EMAIL PROTECTED]> wrote: > > > > > > > > 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] > > > > > > > > > > > > > > > > > > > > -- > > 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 > > > > > > -- > > 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 > > > > > -- > 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 > -- 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]
