10-27-2020 01:59 PM
I am making a top level web page and would like a button on this page to load up another web page.
I'm guessing a simple "redirect" button where I can specify the "GSwitch.html"
So I tried using a Javascript example
So the .js file has the following:
<script src="redirect.js"></script>
And the jlsi looks like this
But it doesn't do anything...meaning it doesn't seem to execute the JavaScript
Any suggestions?
KM
Solved! Go to Solution.
10-27-2020 04:47 PM
Hi KM,
There is an example URL handling library attached to the forum post LabVIEW NXG WebVI's accessing the query string in its URL which includes a Set Window Location VI that can be used to navigate the browser window to a new location. It may help address the redirect use case or be a useful example to build on.
10-29-2020 08:31 AM
I would like to deploy a website with multiple pages and be able to move from page to page depending on selections.
What is the best way to achieve this?
KM
10-29-2020 05:50 PM
Hi KM.
The Multiple Top-Level WebVIs example shows how to make a Web Application with multiple pages. The example uses the hyperlink control to link between the pages which requires the user to click the link to move between pages.
You can programmatically move between pages using the URL.gcomp library in the example I mentioned in the previous post. The library has a Set Window Location VI which you can assign a relative or absolute URL. The following example shows the Set Window Location VI being called in response to a button click: