[weblet] How can a webLet communicate with the hosting html page?

David Bovill david.bovill at gmail.com
Tue Jul 7 09:04:42 EDT 2009


Had a look, I like your hack - great to know you can embed dynamically
generated stacks using a cgi / iRev script!

2009/7/7 splash21 <rev at splash21.com>

> Where there's a will, there's a way....
> This example is pretty basic and I've only tested it on Firefox/Vista.
>
> http://splash21.on-rev.com/revlet/
>
> You can send text from the web page to the revlet.  Communication can flow
> the other way as well.
>
> I saved the test revlet stack with a variable containing a string of 'X'
> characters in the openStack script.
> The .rev file is not embedded on the HTML page - instead there's a .irev
> file embedded.  The .irev file opens the real revlet file as binary,
> replaces the string of X's with the user's session key and spits the
> resulting binary file out to the browser.  This gets downloaded as the
> revlet which now contains the session key and can now communicate with the
> web page.
>
> It may seem like a total hack of a workaround, but it's simple - and it
> seems to work.  Hope some of you guys find it useful!


It's doing the server based roundtrip for the communication though - to get
a responsive Web2.0 type app you need to use Javascript on the client side.
We'll have to wait for revised version of the plugin for that - maybe with
luck we'll even get "do script as javaScript" for standalones as well :)



More information about the use-livecode mailing list