communication between rev and revBrowser

Ben Rubinstein benr_mc at cogapp.com
Mon Aug 18 15:53:35 EDT 2008


Are there any ways to communicate between a page open in revBrowser, and rev 
itself?

In other applications which embed a browser instance, I've been able to invoke 
a javascript function in the browser from the host app; and conversely the web 
page could execute javascript that the host app could intercept.

I hoped to at least be able to do the latter in Rev; but can't find anyway to 
do it (I thought that the browserBeforeNavigate message might give me a way to 
do this - but it really is sent before navigate, not on any action).

Have I missed something?  Is there a way to achieve either of these things 
(I'm especially interested at this point in having the page send messages to Rev)?

So far the best I've been able to achieve is a very crude hack, in which 
javascript on a page attempts to set the document location to a URL starting 
"http://TELLREV....", which I can then catch in browserBeforeNavigate (and 
inspect the rest of the message, and set browserCancel before it does any more 
damage).  However, this is not nice - and among other issues, messages aren't 
guaranteed to be delivered, as if the location is set twice in sucession (or 
even with a short gap) only the latter is the subject of a message to Rev.

So - any suggestions?

TIA,

- Ben




More information about the use-livecode mailing list