Access to browser javascript functions?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mbockol
Posts: 2
Joined: Thu May 27, 2010 3:08 pm

Access to browser javascript functions?

Post by mbockol » Thu May 27, 2010 3:17 pm

Hi Folks,

I've got a revlet that allows users to record and submit a video back to the server. Aft er they click "Send Video" in the revlet and the upload completes I'd like to enclosing web page to refresh showing them the uploaded file. Is there any way I can trigger a call to a javascript function? I see the revBrowserExecuteScript() function, and that looks like exactly what I need, except that it seems to work in a browser embedded in the revlet rather than the browser the revlet is embedded in. I can think of a few hacky work-arounds ( set a timer script in the HTML that calls out to the server checking for a completed upload and refreshs the page when it finds one), but I was hoping this would be possible in a more straightforward way.

Thanks,
Matt

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Access to browser javascript functions?

Post by Mark » Thu May 27, 2010 3:38 pm

Matt,

You want to use the "do" command:

Code: Select all

do "document.write('Hello!')" in browser
Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

mbockol
Posts: 2
Joined: Thu May 27, 2010 3:08 pm

Re: Access to browser javascript functions?

Post by mbockol » Thu May 27, 2010 4:42 pm

Thanks much. That's perfect.

Matt

Post Reply