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

splash21 rev at splash21.com
Thu Jul 23 14:52:06 EDT 2009


The new revlet format doesn't have the plain text stack code visible in 
the file - (which is a good thing!) - so the old example won't work any 
more.
If it did, 2 or more people hitting the stack at the same time would 
work OK, as they are each served out a modified version of the stack 
(created on the fly): the modified version isn't written to disk, it's 
just fired out to the browser as a deviation of the original and then 
discarded.


I just updated the example for the new plugin and it's working again.  
This version uses the new stack property 'the revletParams' to pass the 
session variable to the revlet (as documented in the 4.0.0dp2 change 
log).  Much cleaner.


The 2 way javascript that you spoke of previously is what we really need 
for this kind of stuff.  I'm looking forward to the next web plugin release.

:)




Robert M. wrote:
> Hi! I wanted to turn back to your solution.. but I updated my runweb plugin
> and spash21 does not work anymore! Just to let you know.. 
>
> Now I'll try your solution in order to communicate to the revlet the name of
> a file to open.
>
> The objective is to be able to send a data-file by mail opening up in a
> revlet browser page.
> Problem is how to "pass on" the filename... 
>
> If I get a first hack solution is :
> -- include as a mail-attached-file the data-file
> -- incude as a mail-attached-file an html page with
>     1- a simple form that has the name of the file and that is sent straight
> away
>     2- a call to an .irev file like "launchit.irev" that :
>          a- gets the name of the file from the form
>          b- edit the XXX variable in the revlet binary file, replacing it
> with the file name, then closing it
>          c- launches the modified  revlet in another page
>
> :drunk: Problem : what happens if two users get online... the revlet file
> will be modified.. with filename of misterB before misterA had a chance... 
>
> ;-)maybe we wait until.. javscript comunication is added!!! 
>
> whouau what a world : you can make marvellous animations with runrev4 that
> look damn sexy but you just bang your head on the walls to just send a
> little piece of data... do we sometimes forget.. what the essential is in
> our lives??? !!
>
> Robert
>
>
> splash21 wrote:
>   
>> 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!
>>
>> JC
>>
>>
>> Robert M. wrote:
>>     
>>> The webLets showed in the webinar are autistic : they only seem to work
>>> as a
>>> confined world with no interaction with the rest of the page.
>>>
>>> 1) Is it possible to send them parameters, perhaps via a user  tag within
>>> the object tag??
>>>
>>> I hope they're not autistic, oh god I pray!
>>>
>>> 2) is there a way to have one weblet communicate with another on the same
>>> page??? 
>>>
>>> Thanks... trying to figure out how to use weblets in my site design... 
>>>   
>>>       
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
>>     
>
>   





More information about the use-livecode mailing list