Asynchronous request

Hi all

I need a help in asynchronous http request using Lotus Script. I have a LS agent that calls an url using http GET method. The problem here is i will not get the response immediately. So my code works fine unless there is a response for the request. If there is no response then the code stops its execution untill it gets the response.

So i want the agent to execute other lines of code without waiting for the response. This we can do in javascript using onreadystatechange method. How can be acheive this using LS. I am pasting part of my code here for reference.

Set objHttp = CreateObject(“Microsoft.XMLHTTP”)

Call objHttp.open(“GET”, url, False)

Call objHttp.setRequestHeader(“Content-type”, “application/x-www-form-urlencoded”)

objHttp.send (agent stops here unless there is a response)

Any help on this is appreciated.

Subject: Asynchronous request

The only thing I can think of is, put your LS code in an agent or a action button, create a hidden action (button) on the same form, with the @Command([ToolsRunMacro]; “YourAgentName”) – the button can also have the LS code instead of the agent name.

in the HTML tab of the action button give it a name such as: UpdateNow infront of style enter disply=none to hide it.

now from your javascript you can use the onreadystatechange method after which you can use the following command to invoke the lotus script code…

var f = document.forms[0];

f.UpdateNow.click();