So I have a db table with two fields, the first field is filled by a call to an external page via xmlhttprequest object and the second field is filled by a script function.
The problem is that although I have set the open method async parameter to false my script still does not wait until processing is finished on foo() function and executes boo(). How can I get the xmlhttprequest object to wait? Any ideas???
While(some condition)
...
foo(foobarid)
bar(foobarid)
Wend
Function foo(foobarid)
' Fills field A
Set objHTTP = CreateObject("Microsoft.XMLHTTP")
objHTTP.open "POST", " False
objHTTP.setRequestHeader "Content-Type", "application/x- objHTTP.send "foobarid=" & server.URLEncode(foobarid)
Set objHTTP = Nothing
End Function
Function bar()
' Fills field B
End Function
The problem is that although I have set the open method async parameter to false my script still does not wait until processing is finished on foo() function and executes boo(). How can I get the xmlhttprequest object to wait? Any ideas???
While(some condition)
...
foo(foobarid)
bar(foobarid)
Wend
Function foo(foobarid)
' Fills field A
Set objHTTP = CreateObject("Microsoft.XMLHTTP")
objHTTP.open "POST", " False
objHTTP.setRequestHeader "Content-Type", "application/x- objHTTP.send "foobarid=" & server.URLEncode(foobarid)
Set objHTTP = Nothing
End Function
Function bar()
' Fills field B
End Function