LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW NXG WebVI's accessing the query string in its URL

Solved!
Go to solution
Highlighted

Is there a simple way within LabVIEW NXG 5.0 WebVIs to access the query string at the end of the webVI URL when it's running?

 

 

Example:

A webVI is running at this address: http://localhost/testURL/index.html 

Depending on what data I want to see I make the calls to the webVI like this:

http://localhost/testURL/index.html?test1

 

How can I read in "test1" into the webVI so I can use it to make decisions on the web page?

I like to use it to be able to run the same WebVI but show different data depending on the query string

0 Kudos
Message 1 of 3
(215 Views)
Highlighted
Solution
Accepted by topic author henriksandin

Hi henriksandin,

 

LabVIEW NXG 5 WebVIs do not include support for parsing the URL of a page. It is possible to use the JavaScript Library Interface (JSLI) to call JavaScript functions that can retrieve or parse the page URL, etc.

 

Attached is an example that shows shows several URL manipulation examples using the JSLI including Get Window Location, Set Window Location, Parse URL, and Parse URL Search Params.


Milan
Message 2 of 3
(147 Views)
Highlighted

Exactly what I needed! Thank you so much!

0 Kudos
Message 3 of 3
(107 Views)