LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NXG webvi data transfer

Hi everyone,

I'm trying to use NXG Web Module to create a brief portal with some web pages that mutually interact. For example: the first page lets the user insert username and password and verifies (through a webservice located somewhere else, typically a back end exe in some remote server) the user id, then calls another page where that id should be used for some operations and so on.

 

That's something I normally do with standard LabVIEW applications using tabs. Now I need web apps and some responsiveness that implies to avoid tabs.

 

My problem is how to send the data (in this example the user id) from the first .gviweb panel to the second one. I used several attempts, but I always failed.

 

Can someone help me? Thanks for your help

 

Flavio

0 Kudos
Message 1 of 4
(1,968 Views)

I presume you could send the data as GET/POST arguments (assuming these are not confidential information or too large), and read them from the URL that way using Javascript: Calling JavaScript Functions in a Web Application 

 

The other option that comes into my mind is setting cookies using JavaScript, which you can refer to among your pages.

 

PS: There might be simpler ways of accomplishing this, but I've not used the NXG Web Module for this specific use case.

0 Kudos
Message 2 of 4
(1,899 Views)

Thanks Oscar for your kind reply.

The issue is that data ARE confidential (i.e. login stuff); in "standard" Labview I can use several methods to pass data from a vi to another, but in this environment I find this solution quite hard to follow. Even cookies can be watched by an expert user. I need to send them quietly 

 

0 Kudos
Message 3 of 4
(1,888 Views)

That makes sense, Flavio,

 

The LabVIEW NXG web module is intended to produce code (a website) that runs in the client. As you might have noticed, the WebVIs run entirely in the explorer, which enables their portability.

 

This is a different approach when you compare it with LabVIEW Web Services, which you publish to the NI Web Server or Application Web Server in the host machine (or the server machine if you will).

 

Therefore, each have a different use case, and treat information differently. Then, the LabVIEW Web Services are better at performing these authentication operations (when properly configured) because they run the requests in the server itself; while the LabVIEW NXG Web VIs are a better solution when developing dashboards or monitoring sites that display information from various sources that can be accessed through the network.

 

I encourage you to take advantage of both and make the best out of this two platforms. You can see an example here: Call LabVIEW Web Service 

 

Other resource to consider: Communicating Data with Web Services Using WebVIs 

 

All the best,

0 Kudos
Message 4 of 4
(1,867 Views)