LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting and Setting Browser Objects in LabVIEW

Hello, I have an application that must interact with information found in an ActiveX Container with IE Web Browser in it.  I have tried a number of things with no luck.  I have attempted going down the ActiveX road and could never expose the controls I needed to interact with.  MSDN was of no use to me and just led me down dead ends.  I have also tried using ActiveX events with limited success and it doesn't lend itself to scaleable code!!
 
Any help finding the magic combination of methods, properties and references would be greatly appreciated.  Thanks in advance.
0 Kudos
Message 1 of 8
(3,899 Views)

Please provide more information on what you are trying to do.

Interact with what, are you trying to take information from the Browser into labview?

 

Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 2 of 8
(3,891 Views)

Thanks for the reply Andrew.  Basically I am dropping an ActiveX container onto the front panel and inserting a Web Browser object into the container to give me a browser on my LV front panel.  There are html files being displayed in this browser that have textboxes and buttons on them and I need to trap the buttonclicks and read the textboxes from the browser into LV.  I have gone down the ActiveX road and I think it can be done but I have run into too many roadblocks and was hopeing someone else has already done this.

Thanks for any help.

0 Kudos
Message 3 of 8
(3,874 Views)

You might want to take a look at this link.

http://forums.ni.com/ni/board/message?board.id=170&message.id=28812&query.id=110866#M28812

Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 4 of 8
(3,858 Views)
Thanks Andrew, I took a look at the thread and all they needed was to get the HTML code representing the image on the browser.  I actually want to read the value in the textbox (OK now that I type this maybe I can get that by reading the HTML code...)  but I still do not have a way of trapping a button click on the browser.  Any insight on that?
0 Kudos
Message 5 of 8
(3,851 Views)
The best way would probably be to use Events, however I only have the Base Version of LV and don't have acces to the Event Structures. The only way I can see doing it with out Events is to navigate to the URL, let the user select "whatever", then read the innerHTML for the selected value of the Textbox. 
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 6 of 8
(3,848 Views)
Andrew, your tip definitely helped...now I am reading the value in those textboxes but I am still struggling on those durned buttons!!  There doesn't seem to be a way to do it.  Actually I am doing it for 1 button by trapping a 'TitleChange' activeX event when the user clicks the button.  Here I go thinking and typing at the same time!!  My problem is if there is more than 1 button in the browser.  I just thought that if I could access the title I could set the title based on which button was clicked, that way I would know which button was clicked....HMMMMM.  Thanks again.
0 Kudos
Message 7 of 8
(3,845 Views)

The innerHTML text will indicate if a Radio Button is checked, here is an example of the HTML Text:

There are two radio buttons on this page: One titled Round-trip and one titled One-way.

The only button that was "Checked" when I performed the read of the innerHTML was the Round-trip button.

Round-trip

<TD style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 6px" vAlign=top align=right width=98 rowSpan=2>Travel&nbsp;</TD>
<TD><INPUT onclick=javascript&colon;checkTripType(this.value); type=radio CHECKED value=R name=tripType> Round-trip</TD>

One-way


<TD colSpan=2><INPUT onclick=javascript&colon;checkTripType(this.value); type=radio value=O name=tripType> One-way</TD></TR></TBODY></TABLE></TD></TR>

Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 8 of 8
(3,840 Views)