Re: revBrowserAddJavaScriptHandler

2014-12-17 Thread Mike Bonner
You might look here: http://summerschool.livecode.com/index.php/sneak-peek
theres a very simple, straightforward example a little ways down that page.

On Wed, Dec 17, 2014 at 9:22 AM, John Dixon dixo...@hotmail.co.uk wrote:

 I have determined that I am stupid...:-)

 I am having problems with this... in that I don't understand how to
 implement it at all. Has anyone been using this new command ?... I have
 been trying to use it to call functions in the google maps to do various
 things such as place markers, draw polylines, plot routes... and have
 failed miserably..

 I am unable to find 'any' working examples !... Anyone know if they exist
 and if so where are they hidden ?

 -- from 6.7 release notes--

 The new chrome browser allows us to add the ability to call LiveCode
 handlers from within the browser using
 JavaScript. To make a LiveCode handler visible to JavaScript, use the
 revBrowserAddJavaScriptHandler
 command, and to remove it use the revBrowserRemoveJavaScriptHandler
 command. LiveCode handlers are
 added as functions with the same name attached to a global 'liveCode'
 object. When called, these functions
 will result in the corresponding LiveCode handler message being sent to
 the browser card with the browser
 instance ID and any function arguments as parameters.

 Example:
 With the handler myJSHandler registered using
 revBrowserAddJavaScriptHandler, it can be called from
 the browser like so:

 liveCode.myJSHandler(tFieldContents, tAction);
 the LiveCode handler would then be called with the following parameters:

 pBrowserInstance (the browser instance id, as returned from the
 revOpenBrowserCef function)
 pFieldContents (the first argument of the JavaScript function call)
 pAction (the second argument of the JavaScript function call)

 thanks,

 Dixie

 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: revBrowserAddJavaScriptHandler

2014-12-17 Thread John Dixon


 Date: Wed, 17 Dec 2014 09:59:13 -0700
 Subject: Re: revBrowserAddJavaScriptHandler
 From: bonnm...@gmail.com
 To: use-livecode@lists.runrev.com
 
 You might look here: http://summerschool.livecode.com/index.php/sneak-peek
 theres a very simple, straightforward example a little ways down that page.
 
Thanks Mike... though I was hoping that there would be a few examples 
particuarly showing how to employ javaScript functions with it...

Be well,

Dixie
  
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revBrowserAddJavaScriptHandler

2014-12-17 Thread Mike Bonner
I tried the example there, all I can get it to do is.. lock up.

As far as combining javascript and livecode, I'd say it depends on what you
want to do.  If you can get the example from that page working, it would be
a great start as far as sending data from the page to lc for processing.
If you need the javascript to do something first, my guess would be a dual
function type of thing.  Have a function that does something (say generate
a random number to keep it simple)  that then calls another function as in
that example that sends the results back to an LC handler for additional
processing. THen to make it run (initiated from LC) revbrowsercallscript to
trigger the first function which does the javascript side, which then
triggers the second function which calls the lc handler.


Of course all of this requires that it work at all. So far, even the one
example just fails and hangs.


On Wed, Dec 17, 2014 at 10:26 AM, John Dixon dixo...@hotmail.co.uk wrote:



  Date: Wed, 17 Dec 2014 09:59:13 -0700
  Subject: Re: revBrowserAddJavaScriptHandler
  From: bonnm...@gmail.com
  To: use-livecode@lists.runrev.com
 
  You might look here:
 http://summerschool.livecode.com/index.php/sneak-peek
  theres a very simple, straightforward example a little ways down that
 page.
 
 Thanks Mike... though I was hoping that there would be a few examples
 particuarly showing how to employ javaScript functions with it...

 Be well,

 Dixie

 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revBrowserAddJavaScriptHandler

2014-12-17 Thread Bob Sneidar
Probably not helpful to you, since this is a web server issue, but on a Mac in 
the IDE I was able to tell Applescript to tell Acrobat to run a javascript. 
It’s a bit convoluted, but it works. It’s how I get the structure of a PDF form 
so I can fill it later. I wish I could figure out how to do that in Windows as 
well. Otherwise it’s  a Mac Only feature. 

Bob S


 On Dec 17, 2014, at 09:26 , John Dixon dixo...@hotmail.co.uk wrote:
 
 
 
 Date: Wed, 17 Dec 2014 09:59:13 -0700
 Subject: Re: revBrowserAddJavaScriptHandler
 From: bonnm...@gmail.com
 To: use-livecode@lists.runrev.com
 
 You might look here: http://summerschool.livecode.com/index.php/sneak-peek
 theres a very simple, straightforward example a little ways down that page.
 
 Thanks Mike... though I was hoping that there would be a few examples 
 particuarly showing how to employ javaScript functions with it...
 
 Be well,
 
 Dixie
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: revBrowserAddJavaScriptHandler

2014-12-17 Thread Andrew Kluthe
John,

From what I see in the summerschool example and the release notes that you
posted, this feature does the inverse of what you are wanting. I'm not sure
how to do it the other way.

Andrew

On Wed, Dec 17, 2014 at 1:14 PM, Bob Sneidar bobsnei...@iotecdigital.com
wrote:

 Probably not helpful to you, since this is a web server issue, but on a
 Mac in the IDE I was able to tell Applescript to tell Acrobat to run a
 javascript. It’s a bit convoluted, but it works. It’s how I get the
 structure of a PDF form so I can fill it later. I wish I could figure out
 how to do that in Windows as well. Otherwise it’s  a Mac Only feature.

 Bob S


  On Dec 17, 2014, at 09:26 , John Dixon dixo...@hotmail.co.uk wrote:
 
 
 
  Date: Wed, 17 Dec 2014 09:59:13 -0700
  Subject: Re: revBrowserAddJavaScriptHandler
  From: bonnm...@gmail.com
  To: use-livecode@lists.runrev.com
 
  You might look here:
 http://summerschool.livecode.com/index.php/sneak-peek
  theres a very simple, straightforward example a little ways down that
 page.
 
  Thanks Mike... though I was hoping that there would be a few examples
 particuarly showing how to employ javaScript functions with it...
 
  Be well,
 
  Dixie
 
  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode

 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode



-- 
Regards,

Andrew Kluthe
and...@ctech.me
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode