Wednesday, 15 September 2010

url - calling callback function before rest of code (Javascript D3) -



url - calling callback function before rest of code (Javascript D3) -

basically want string result url. result when utilize browser on url can simple string "word dog cat dog".

i'm trying utilize following:

var textwords; d3.text(myurl, function(data) { textwords = data; });

and later on using textwords somehow in next lines, can't of course of study because callback function executes after other code.

is there way (other putting of next code within callback function) can manage utilize textwords after gets data?

thank you!

unfortunately short reply no. long reply no, create things little nicer using jquery's defferred. there introduction here

javascript url callback d3.js

No comments:

Post a Comment