LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remote Panel Disconnect, Close Browser

Hi,

I try to implement a simple logout feature in a remote panel application. If the user clicks a logout button, the remote panel connection and the browser window should be closed. I tried the invoke node "VI-Remote Panel-Disconnect Client" but always got an error message.
Thus anybody know how to implement such a feature?

Thanks, fRi
0 Kudos
Message 1 of 2
(2,838 Views)
I don't know if the remote panel applet has any ability to interact with the browser context. It's a good question.

Using the approach you mentioned, you should be able to successfully disconnect the browser client without an error. Make sure to feed the output of the "Remove Panel Client Connections" method directly into the "Remote Panel Close Connection to Client" method so you get the right port. Disconnecting doesn't mean closing the browser window, though; for that you have to escape from the applet and tell the browser itself to close, and I don't know if that's possible from the perspective of the embedded VI.

One alternative non-LabVIEW approach would be to add some javascript into the HTML file to close the window. Here is one Web site that gives you the appropriate code for a button or a link to do this. You can make it look pretty natural (sort of like a set of HTML frames) if you create a little button graphic from a LabVIEW panel snapshot and stick it in a table cell directly below the VI applet.

Even with this approach, most people will have their Web browser security settings configured in such a way that there will be an additional "Are you sure" prompt.

Hope it helps,
John
0 Kudos
Message 2 of 2
(2,819 Views)