LabVIEW Web Development Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

What are browser requirements to run web application developed with NXG Web Module

Solved!
Go to solution

I have an index.html which was built in LabVIEW NXG Web Module. When I run the html file on Microsoft Edge, I can see button control. But on Chrome, a view of the string and button control is strange. According to readme, Web Module supports the latest version of Chrome/Firefox/Edge/Safari. What Chrome settings should I check?

 

I installed only LabVIEW 2017 on my test PC, not NXG.

 

Microsoft EdgeMicrosoft EdgeChromeChrome

 

On Chrome, image doesn't appear but is not problem. Further large issue is a view of string and button control.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 1 of 10
(5,856 Views)

Hi Emboar,

 

I don't know of any settings in Chrome that could be causing this.

 

Can you tell me what web server you're using to host your WebVI? It might be a problem on that side.


Christina Rogers
Principal Product Owner, LabVIEW R&D
0 Kudos
Message 2 of 10
(5,790 Views)
I don't think that's the reason for LabVIEW. The main reason is that the components called by the content of your HTML file are not well supported in chrome
0 Kudos
Message 3 of 10
(5,481 Views)

Hi Christina_R, thank you for your reply. This is my PC environment.

 

OS Windows10 64bit Professional

Edge

Microsoft Edge 42.17134.1.0

Microsoft EdgeHTML 17.17134

Chrome 79.0.3945.79(Official Build) (64bit)

 

Security

ESET Endpoint Antivirus Ver 5.0.2271.3

Windows Firewall

 

I just ran index.html on Edge or Chrome.
To be honest, my PC has much security software. Is there any possibility that those are preventing?

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 4 of 10
(5,388 Views)

Hi michael-lxc, thanks for your comment.

Do you mean that Button Control and String Control are not supported by Chrome?

What controls does Chrome provide support? I cannot understand the readme.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 5 of 10
(5,384 Views)
Solution
Accepted by topic author Tepig
I just ran index.html on Edge or Chrome.

If you just opened the index.html file from the file explorer, so that in the url bar you see a file: based url, for example like:

 

MilanR_0-1576085316250.png

Then the WebVI will fail to run correctly. The WebVI has to be hosted on a Web Server for some browsers to run it. Chrome is particularly strict and will not run WebVIs opened directly as files.

 

When running in the editor you can use the the "Run in browser" feature to test the WebVI in different browsers. The Hosting a Web Application on a Server topic gives more options for deploying WebVIs to a Web Server.

 


Milan
Message 6 of 10
(5,347 Views)

MilanR, the root cause was what you suggested. When I uploaded my web application into SystemLink Cloud and ran it, the problem was removed.

I guess many user will have this type of problem. Why don't you create KB or is there already?

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 7 of 10
(5,339 Views)

Hi Emboar,

 

We are still looking into it but in NXG 3.1 there was a banner that was shown if we could detect that the html file was opened without hosting on a Web Server that looked like the following:

 

MilanR_0-1576112603919.png

But it seems like there may be a regression in NXG 4 that is preventing that detection from happening. I agree that it is likely others will run into this behavior as well so hopefully we can correct / improve the experience.


Milan
Message 8 of 10
(5,329 Views)
I haven't used the NXG version. I've been using LabVIEW 2017. I recommend that the front end be separated from the back end. Through Ajax, the front end can use various front-end frameworks or native HTML + CCS, and the back end can use LabVIEW. In this way, the front-end and back-end architectures are relatively clear. At present, I use this method has implemented a B/S management system. At present, it can support all kinds of chart display and 3D animation display based on Threejs.
Message 9 of 10
(5,317 Views)

Hi michael-lxc

 

Through Ajax, the front end can use various front-end frameworks or native HTML + CCS, and the back end can use LabVIEW.

This is exactly the architecture with WebVIs in LabVIEW NXG when using LabVIEW Web Services! 😁


When you build a WebVI you get HTML, JavaScript, CSS + other assets that when served to a web browser behave like a web page. You can use the HTTP Client VIs on your diagram to make Ajax requests to a backend LabVIEW Web Service. You can also create reusable libraries with the JavaScript Library Interface to integrate other frameworks. I have a work in progress example that creates a library for ECharts that is hosted on GitHub pages. Creating a Library with the JSLI document to utilize three.js from a WebVI diagram would be pretty powerful.

 

We also have an example called Call LabVIEW Web Service that implements the pattern you described with the front end as a WebVI which is separate from the backend which is a LabVIEW Web Service. The gcentral.org package search tool is implemented with this approach and the source is available on GitHub.

 


Milan
0 Kudos
Message 10 of 10
(5,273 Views)