LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IHTMLElement ondataavailable

Where can I find documentation on IHTMLElement -> ondataavailable.  I see that a variant type come out, but I'm not sure what to do with it.  I'm trying to detect when there is data in a IWebBrowser2->Document->Body.  I currently poll its "innerText", but I'd rather check a boolean or have a callback routine.
0 Kudos
Message 1 of 3
(2,715 Views)
Is it possible to use Get Variant Attribute VI with Specific Attribute Name String and use the FOUND? boolean to see if there's data?
Andy Chang
National Instruments
0 Kudos
Message 2 of 3
(2,697 Views)

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

 

 

0 Kudos
Message 3 of 3
(2,557 Views)