01-21-2010 11:28 AM
01-22-2010 09:34 AM
07-12-2010 12:19 PM
Below is a blurb I found online at a microsoft-related website.
----
When you handle asynchronous data, it is useful to start processing in parallel with the download as soon as data becomes available. The ondataavailable event fires each time a new chunk of data arrives, so that you can do the transfer immediately. However, the onreadystate event fires when the document load is complete. In order to get the last chunk of data, you must process it when the readyState property equals 4 in the onreadystate event handler
----
What I really need to do in my labVIEW code is to generate a User Event when there is data available, but it would probably be more reliable if the 'onreadystate' property readyState is equal to '4'. I have to register an event, but I'm not sure what type to make it. I originally thought of a cluster containing a string (will contain html response) and a timestamp. However, it seems like I need to have a separate Event Structure that is waiting for all of this stuff to happen (i.e. onreadystate == 4, etc, and when it happens, that is when I generate the event that then takes what's in the document body (inner text) and processes it. I just don't have a good grasp on how to get the event structure to trigger on the condition(s) described above. I looked at the example VI, Programatically Fire Events.vi, and I came up with something like this...but I'm just not having luck knowing what properties to camp on