Browser window in new Tab?

Get help using Construct 2

Post » Wed Nov 30, 2016 12:04 pm

Using the Browser object Is there a way in Construct to force a web link that has been clicked on to open in a new tab rather than a new window?

Seem to be having an issue in Chrome where the link is popping up in a new separate window rather than just being attached as a tab to the current browsing window.
Some games: https://play.google.com/store/search?q= ... s&hl=en_GB Feel free to show the panda some support, he would appreciate it :)
B
19
S
5
G
1
Posts: 155
Reputation: 1,619

Post » Wed Nov 30, 2016 12:56 pm

The Browser Open URL in New Window action should open your link in a new tab (depending on your browser's settings). I don't think that opening in a new tab can be forced by Javascript if the default in the browser is set to open a new window. You can, however, force a new window to open....

If you want to have some control over the new window that's opened then you could use the Browser.ExecuteJavascript:

To control how new window is formatted:
Code: Select all
"window.open('http://www.w3schools.com/jsref/met_win_open.asp', '_blank', 'toolbar=yes,scrollbars=yes,resizable=yes,top=300,left=300,width=400,height=400');"
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 16 guests