Author: S2kDriver | Posted on: 5/12/2010 1:29:39 AM | Views : 541

I'm calling a web service called GetTooltip from inside Javascript.  However, since the web service is called asynchronously, it doesn't wait until I get the return value from the web service, before it continues again.  This is a bit of a problem for me, since the web service is in a for-loop.  How do I make the Javascript wait until I hear back from the web service, before letting Javascript continue the for-loop?  Thank you.


function setTooltip() {
          var completionList = $find("TextBox1_AutoCompleteExtender").get_completionList();
          for (i = 0; i < completionList.childNodes.length; i++) {
                    var item = completionList.childNodes[i]._value;
        & ...

Go to the complete details ...