EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 13, 2024, 01:07:15 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
JavaScript callback
Pages: [
1
]
« previous
next »
Print
Author
Topic: JavaScript callback (Read 9899 times)
Pierre
Sr. Member
Posts: 439
JavaScript callback
«
on:
July 29, 2013, 11:02:07 AM »
Hello all
I have this code:
function myfunc()
{
func1();
func2();
func3();
}
I need that func2 run after func1 finished, and func3 should run when func2 is finished.
They are executed as 1,2,3 but they are not finished on that order (for example, func2 is slow and it is not returned, but func3 is already executed.
Question is - how to run those functions so that I'm sure that next function is executed only when previous function is finished?
Thanks.
Logged
chrwei
Full Member
Posts: 219
Re: JavaScript callback
«
Reply #1 on:
August 15, 2013, 08:34:50 AM »
that depends on what's happening inside those functions. if they are async calls of some sort (ajax, timers) then you need to handle that somehow so that the function does not return until its work is complete.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...