url_open_ext

Opens a URL on a browser with a specific target.

Syntax:

GML Code Example

url_open_ext(url, target);


Argument Description
url The URL (website address) to link to.
target This is the target area to open the URL in.


Returns: N/A


Description

This will open the specified URL on the browser of the chosen target device, or, if you are using the HTML5 module, in the currently open browser. The "target" parameter that you specify is the same as the standard JavaScript "name" value when you use the open() method, and you should be aware that all but '_self' may result in the browser blocking, or asking the user if they wish to allow it.

Valid targets are:

"_self": Opens the linked document in the same frame as it was clicked (this is default).
"_blank": Opens the linked document in a new window or tab (this will not work if pop-ups are being blocked by the user, in which case you can use the clickable_* functions instead).
"_parent": Opens the linked document in the parent frame.
"_top": Opens the linked document in the full body of the window.

NOTE: On the Windows 8 (JS) target platform, this function will work, but additional parameters will be ignored and the default browser will be launched with the given url.


Example:

GML Code Example

url_open_ext( 'http://yoyogames.com', '_blank');

This would open the YoYo Games homepage in a new window.


Back: HTML5



No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here