Monday 15 June 2015

run a script after one javascript function executed successfully -


I have 2 functions in javascript and I use the result of the second one 1. Now I have a script in both functions Have to use. Using simple code (calling both functions) is not working because it takes longer than before. Any simple solution. Do not want to change code too much ??

This is a simple solution:

  var global; Function func1 () {// Function1 Code.Process global func2 (); } Func (func2) {// Function2 code}   

Or you can use the callback method used by Bruno

No comments:

Post a Comment