From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect HTML link in ActiveX Front Panel to labview

I have an HTML page that I load into the Front Panel with the ActiveX Web Browser, and I'm looking into how to connect links clicked on that HTML page with commands run in Labview. In particular, I want a link clicked on the HTML page within the Front Panel to run a Case Structure. Any ideas on how this could be done. A very simple example would be greatly appreciated.

0 Kudos
Message 1 of 7
(3,606 Views)

You need to register event ("BeforeNavigate2" should work) and create callback vi -  that will be executed when this event happens. 

Check ActiveX Event Callback for IE.vi in Help -> Find examples -> ActiveX

0 Kudos
Message 2 of 7
(3,553 Views)

Thanks for your reply. Can you diagram a quick example? I'm very new to Labview and I'm not sure exactly what you're suggesting. Thanks again for your help.

0 Kudos
Message 3 of 7
(3,547 Views)

Go to Help (any labiew window, menu bar) -> Find examples -> Search -> Type "ActiveX", open ActiveX Event Callback for IE.vi. 

0 Kudos
Message 4 of 7
(3,536 Views)

Thanks, but my examples don't include that, or at least one by that specific name. I have one simply called ActiveX Event Callback, which is an example wherein the title of the webpage you visit is displayed. I'll spend some time looking through it, but I'm still not sure how to differentiate clicking one of many links on an HTML page. I'm essentially making an HTML Front End interface where clicking different links runs different commands.

0 Kudos
Message 5 of 7
(3,479 Views)

Hi somethingvague,

 

If you're already looking at the ActiveX Event Callback.vi, I think the best way would be to use this outline and adding a case structure inside of the event structure. If you know what the options for the new Web Page URL are depending on which item is clicked on the page, you could set up a case structure within the "Web Page URL": Value Change Event. For instance, if you wanted to discard any time they click a link that would send them to "discard.com", you would put a case structure where it would read the new Web Page URL and in the case of "discard.com", it would not change the web page URL. 

 

Could you be a bit more specific as to the function of this application? If we knew what your end goal was, it would be easier to help develop a solution. 

 

Best,

 

Zoe B.

Account Manager - Pacific Northwest
0 Kudos
Message 6 of 7
(3,459 Views)

Try this one... works in win7 LV 2011. 

Why have you chosen ActiveX? 

Microsoft dropped ActiveX support from the Windows Store edition of Internet Explorer 10 in Windows 8. In 2015, Microsoft Edge, the replacement for Internet Explorer, dropped ActiveX support, marking the end of the technology in Microsoft's web browser development

Message 7 of 7
(3,452 Views)