Pass data from Web page in revBrowser to stack

Slava Paperno slava at lexiconbridge.com
Thu May 26 02:26:21 EDT 2011


In the revBrowser entries in Dictionary I see two methods for the stack to
call a JavaScript function in the loaded Web page, but I don't see anything
about passing data or making calls in the opposite direction: from the Web
page to the stack.

Since I write the Web pages that get loaded in my revBrowser, I can put any
custom scripting in them. If this were an Adobe Director project using Web
Xtra to load an HTML page in a sprite, I could do this in the Web page:

ondoubleclick="window.external.execDirectorScript(MyData)"

and the message execDirectorScript would be passed to the application, with
MyData as the argument.

Can something along those lines be done in LC? When the user double-clicks a
word in my Web page in revBrowser, I need that word (the selection) to be
passed to the card script. I know about the "selected" property of
revBrowser, but using that for my purposes would require that the user made
a selection in the revBrowser window and THEN clicked some control in the
card outside the revBrowser rectangle. I don't think that would be
intuitive.

Somebody mentioned Tim Bobo who apparently is creating some tremendous
library for webkit-like stuff, but I think he is on the developer list, and
I don't have access to that... Hopefully, someone else can send any tips my
way?

Thanks,

Slava






More information about the use-livecode mailing list