Take the 2-minute tour ×  I have to call two functions on form
submit but i want to make sure that that second function is
executed only after the first function is executed. I do not
have control over the first function, so i cannot edit it at
all.  function a(et){    //function a script   function b(evt){
//function b script  from function b is there a way that i can
check if function a was completed or executed fully.
share|improve this question So function a is asynchronous? – 
Musa Apr 16 '13 at 19:16 you can have a global variable and set
it's value to some constant value in function a..and then check
that value before calling function b –  Ankush Jain Apr 16 '13
at 19:17 look at this, this may help you.
stackoverflow.com/questions/1370766/… –  jycr753 Apr 16 '13 at
19:18 yes function a is asynchronous –  nyshangal Apr 16 '13 at
19:18 Have "b" check to see if the number of stores is
visible... –  Matthew Blancarte Apr 16 '13 at 19:31  3 Answers 3
if you have no access to a at all then you can't do w