05-30-2020 09:16 AM
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
Solved! Go to Solution.
05-31-2020 03:38 PM
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.
06-01-2020 02:38 PM
Exactly what I needed! Thank you so much!