Way for browser to talk to Rev?

Ben Rubinstein benr_mc at cogapp.com
Thu Dec 30 10:34:23 EST 2004


on 28/12/04 8:01 pm, Dar Scott wrote
> On Dec 28, 2004, at 9:40 AM, RGould8 at aol.com wrote:
> 
>> I know that I can use Revolution to talk to Applescript to pass
>> values/commands to IE and Safari via their "Do Applescript" calls, but is
>> there a method of going the other way?   (For instance, pressing a button on
>> a web-page which sends a Javascript call back to Revolution that can be
>> picked up?)
> 
> Maybe the Revolution app can be a simple HTTP server on a weird port.
> A form can be sent.  A problem might be in staying on the same page and
> not expecting a new page.

I think Dar's got the best way.  Have the Rev stack accept connections on
some obscure port; then the browser can make http calls to it on that port.
If it's all running on the same machine, use the address 'localhost' or
'127.0.0.1'.  If you want to stay on the same page, you can use an iframe;
javascript (or even a simple link with a 'target' attribute) can change the
src of the iframe to the results of a call to Revolution.  Either you could
just use this to display the result to the user, or javascript could read
back the text from the iframe in order to further process it.

 
  Ben Rubinstein               |  Email: benr_mc at cogapp.com
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866

  



More information about the use-livecode mailing list