05-16-2024 09:03 AM
Hi to all
I'm new to G WEB DEV SW and I want on my Frontpanel just a linkt to "www.goggle.com".
When I add "www.google.com" as URL to the Hyperlink Control and I click the link it open a browser window with "localhost:64578/HtmlVI/Run/VireoDevSystem/Interactive/WebApp/www.google.com".
Why it's add the URL of my web app?
Thanks
Solved! Go to Solution.
05-16-2024 12:08 PM - edited 05-16-2024 12:10 PM
It's the difference between relative and absolute URLs as described in the Mozilla Developer Network (MDN) help topic What is a URL?: Absolute URLs vs relative URLs.
Lets say for example I am on the website https://www.example.com . If there is a hyperlink on the page to https://www.google.com then that would be an Absolute Full URL as described by the help topic. When I click that URL it is clear that you would go to a different domain, i.e. google.com.
Instead if I am on https://www.example.com and there is a hyperlink to www.google.com because there is no scheme defined, i.e. the https part, the url is treated as a relative sub-resource URL so if I click that URL I would use the scheme and domain of my current URL, i.e. https://www.example.com and end up at https://www.example.com/www.google.com/ .
The short version is that you need to give a full URL to navigate to a completely different website, i.e. https://www.google.com and use relative URLs to navigate between pages of your site. I'd recommend playing with the Multiple Top-Level WebVIs example to get familiar with relative URLs between WebVIs and the Linking WebVIs in a Web Application help topic in the manual.
Also if you are just getting started with G Web Development Software I'd highly recommend going through the presentation How to Build a Web UI for Your LabVIEW-Based Test System for an introduction to G Web and how to make applications with it.
05-17-2024 09:29 AM
Hey MilanR, thanks a lot for your fast response.
That was exactly the point!