Author: rjbdetroit | Posted on: 4/30/2008 1:35:17 PM | Views : 285

I'm new to web services. I need to call a web service from Javascript. I can get this to work asynchronously, but I want to do this synchronously (I need the results of the web service before I can continue to process).

I keep seeing how to do this using the file webservice.htc but I can't find that file anywhere, including Microsoft's site. I'm guessing this is no longer supported. Can someone give me pointers on how to do this? I have code below. I read something that if you don't give a callback handler (OnComplete), the call is made synchronously, but then I don't know how to get the return value (ret variable in my code is undefined after the web service call).  This code works asynchronously but I need it to work synchronously. I'm doing this with .NET 2005 using Ajax Toolkit.

Any help greatly appreciated.
function UserExists(UserName) { ...

Go to the complete details ...