Run client side function as a thread

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Run client side function as a thread

#1

Postby Segi » Wed Sep 21, 2016 6:01 pm

I came across Dave's post at http://forum.ebasetech.com/forum/viewto ... ght=thread about running Java threads. I am trying to figure out how to apply that logic to my scenario.

On the client side, I make a call to a client side function called generateReport() using $eb.executeFunction. This function can take a while to process and generate the report. What I'd like to do is run that function as a separate thread so that generateReport() does not lock up the browser while the function is being executed.

How could you do something like this ?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Sep 22, 2016 7:51 am

That's what $eb.executeFunctionAsynchronously() is for. It provides a mechanism to execute a function on the server and notify you when the function completes, in the meantime the browser user can carry on.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#3

Postby Segi » Thu Sep 22, 2016 5:04 pm

Jon,

Thank you. This is exactly what I was trying to accomplish
0 x


Who is online

Users browsing this forum: No registered users and 13 guests