LC Interaction with Web Browser Instance

Slava Paperno slava at lexiconbridge.com
Sat Jun 4 01:32:57 CDT 2011


Hi Bob!

I've been playing with revBrowser and making discoveries for the past week.
There are people on this list who know these things a lot better than I. But
here is what I would suggest you try--based on what I've learned from these
good folks and tried out myself.

At the end of the JS function that does the calculation, add this statement:

window.location="#?CalcRes=" + CalculationResults;

In the script of the stack card where this revBrowser lives, add this
handler:

on browserBeforeNavigate pID,pURL
   answer pID & " " & pURL  
   --add script to verify the pID (revBrowser instance ID) & to parse and
use pURL
end browserBeforeNavigate

That's what I'm using in my current project, and it works like a charm. I
use LC 4.6.1 in Windows 7, 64-bit. I haven't yet built a standalone or tried
on any other platform, but I know that the mobile implementations do not
have revBrowser.

Slava

> -----Original Message-----
> From: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> bounces at lists.runrev.com] On Behalf Of Bob Cole
> Sent: Saturday, June 04, 2011 12:55 AM
> To: use-livecode at lists.runrev.com
> Subject: LC Interaction with Web Browser Instance
> 
> I have a web browser instance in a card displaying a html page; looks
> good.
> To keep it simple, lets say the page has a button that adds two
> numbers; works correctly.  The button does not cause a page reload.
> I would like to capture the fact that the HTML button was clicked in
> the browser and I'd like to get the result.
> Does LC receive any messages when activity takes place entirely within
> a HTML page like this?
> I am using Mac OS X 10.6.7 and LiveCode 4.6.1.
> Thanks for any help.
> Bob
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list