Asynchronous programming in javascript -


i have load() function, inside want call function download(), download xml file. once download completed , have call function parsexml() parses downloaded xml file. once parsing completed, have call function processparsedxmlfile(). can please guide me how can achieve in simplest possible way ?

you can use callbacks

load(params , function(){   download(params, function(){       parsexml(params, function(){         processparsedxmlfile(params, function(){            ...         })       })    }) }) 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -