URL (and database)

Greetings - Is there a way to populate a Label or a TextField or TextArea so that it will function as a URL, opening the default browser and linking to the site or document referenced by the URL?

If there is a way to do this, what would be needed to populate that object (Label, etc) from an SQLite database?

I would like to be able to store the URL of a document (in this case an electrical component spec sheet) and then be able to view that document in the computer’s default browser.

Thank you very much - Jim Wagner, Oregon Research Electronics

Just do something like:

System.GotoURL("https://www.xojo.com")

in a suitable event.

Thanks

Jim

1 Like

I was just looking at this for the web app I am working on to bring from Xojo2018 to Xojo2023r3. It looks like the code in web app would be using “me” instead of “System”:

me.GoToURL("https://www.xojo.com")

I’m stuck at 2019 right now but I’ll keep that in mind. I’m not finding any reference to GoToURL in the 2019 LR. Got to try it to see what happens.

Just tried desktop 2019R3.2 on MacOS Monterey in debug mode, Neither
system.GoToURL("https://www.xojo.com") OR me.GoToURL("https://www.xojo.com") exists! Foo!

Does anyone have a way that works with older Xojo versions on Mac? Command line?

Thanks
Jim

Is good to put that information on the first message.

Try

ShowURL("https://www.xojo.com")

Sorry, I am usually pretty careful about that (showing Xojo version). ShowURL works!

Thanks, Jim

Don’t worry, sometimes this happens. As Xojo has changed over the years, current answers could not apply to older versions.

I’m glad that ShowURL works for you.

Regards.