System.GotoURL
From Xojo Documentation
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site! |
Uses the appropriate web browser application (based on the user’s Internet settings) to go to the HTTP URL specified.
Notes
Displays the supplied URL in the user's default web browser. If the browser is not open, it will launch the browser. Whether the URL opens in a new tab or a new window is controlled by the user's browser settings.
GotoURL is not global in a web app so you need to use WebControl.GotoURL or WebSession.GotoURL instead.
A URL is an address for Internet locations such as web sites, FTP and email addresses.
When used in a web app, if a web URL is passed, the current page is replaced with the page at the URL passed.
Some web browsers have a limit on the length of a URL. These are common prefixes:
URL Prefix | Type | Notes |
---|---|---|
http:// | web site | Displays in the default web browser. |
mailto: | Opens the default email client with the supplied email address filled in. | |
ftp:// | file transfer protocol | Opens the default FTP application to download the specified file. |
Sample Code
This desktop code launches the user's chosen web browser and go to the Xojo web page.
This desktop code launches the user's chosen FTP client application and go to an FTP site.
This desktop code launches the user's chosen email application and create a new email message, with the specified email address in the "To" area.
Compatibility
Desktop and iOS project types of all Desktop, iOS and iPadOS operating systems.
See Also
HTMLViewer, WebHTMLViewer classes