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');"
Learning other engines, but C2 still rocks. Image Image Image Image
B
80
S
22
G
95
Posts: 2,417
Reputation: 57,671


Return to How do I....?

Who is online

Users browsing this forum: Ofris, socialpilgrim and 5 guests