LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open url in a remote panel

HI.

 

I want to put a button that launch a webpage. I works fine locally, when I click OK button, a  new internet window browser is open with the URL.

 

But if I take the control in other PC client (using Web Publishing Tool) and I click OK button a internte window browser is open in THE HOST. I want to open the new window in the Client.

 

Thanks.

 

I attach the VI (open_google.vi) and the HTML file created by WPT (test.txt)

Raymundo Cassani
Download All
0 Kudos
Message 1 of 2
(2,706 Views)

Hello,

 

When you view or control a VI using Remote Panels that VI is executing on the host side. The VI will not be able to interact with the operating system on a remote panel client. This means that it will not be possible to use this approach to open a browser window on the client side.

 

You could take another approach- at least the way I would do it is thusly:

Instead of putting the button that launches the page in the VI you could put it in the html file that the remote panel is hosted in.

Using javascript you could pop up a new browser window with the URL you need.

If you need to control what URL is viewed from within the VI you could make the button point to a URL that will be handled by your VI that can redirect to the URL you need. This would be easy to do in 8.6 as you could simply export the VI as a web service. Pre-8.6 you would either have to use the G web server or build a minimal web server yourself (this would be easier than it sounds since the server would have to do nothing but redirect).

I should add that this approach would require some knowledge of HTTP/HTML/JavaScript.

 

Let me know how it goes.

 

Nathan

 

Message Edited by NathanK on 10-15-2008 11:07 AM
Message 2 of 2
(2,697 Views)