Standup April 25, 2008

edit Posted by Erik Hanson on Friday April 25, 2008 at 04:18PM

Interesting Things

  • Erector is nearing its initial beta release.

    Erector is a Builder-like view framework, inspired by Markaby but overcoming some of its flaws. In Erector all views are objects, not template files, which allows the full power of object-oriented programming (inheritance, modular decomposition, encapsulation) in views.

  • The latest Rails Podcast features Pivotal's Nathan Sobo talking about Treetop.

    Treetop is a language for describing languages. Combining the elegance of Ruby with cutting-edge parsing expression grammars, it helps you analyze syntax with revolutionarily ease.

Ask for Help

  • "Can anyone suggest any solutions, or point to a web site that seems to have solved the following problem: an iframe that's showing content from one domain wants to communicate with its parent document that's showing content from another domain, without modifying the parent document's URL or refreshing the parent document's page? Adding Javascript to the parent document is okay, but installing a proxy on the server of the parent document's domain isn't possible."

Comments

  1. Tim Connor Tim Connor on April 28, 2008 at 05:43PM

    Cross-frame cross-domain scripting? If it's same sub-domain there is a setting for IE. Also, I remember there used to be some various Ajaxy work-arounds, pre-AJAX days (something with dynamic script tags, irrc), and I know XHR implementations in at least some browsers have a way to do this.

    But, the simplest consistent xbrowser way might be via the good old hash: http://www.tagneto.org/blogcode/xframe/ui.html#pipeMessage_1209404303566

    Every day, it seems we find more ways to get more functionality out of the same good old standards. r

  2. alimills alimills on April 28, 2008 at 10:50PM

    "Can anyone suggest any solutions..."

    You could do the following with a couple SWFs and their LocalConnection [http://livedocs.adobe.com/flex/2/langref/flash/net/LocalConnection.html] class:

    1 - add the JS you'd like called to your main page

    2 - add a single pixel SWF to you main page that will act as a LocalConnection server (using the "connect" method [http://livedocs.adobe.com/flex/2/langref/flash/net/LocalConnection.html#connect()])

    3 - add a single pixel SWF LocalConnection client to your iFrame (using the "send" method [http://livedocs.adobe.com/flex/2/langref/flash/net/LocalConnection.html#send()])

    4 - use the LocalConnection client to call a method on the LocalConnection server that, in turn, calls out to JS on the main page

    5 - use ExternalInterface [http://livedocs.adobe.com/flex/2/langref/flash/external/ExternalInterface.html]to communicate between the SWF and JS

    This approach requires the Flash Player, but it'll work.

    Ali

  3. coderrr coderrr on April 29, 2008 at 12:24AM

    This is exactly what you want.

    http://softwareas.com/cross-domain-communication-with-iframes

Add a Comment (MarkDown available)