application.showURL target '_blank' doesn't open URL on mobile devices

Hi guys,

I am trying to open a URL in a new tab on a mobile device using application.showURL however it doesn’t work, on desktop it works fine.

I have gotten around this by passing _self as the browserTarget parameter, which works, but ideally I would like it to open in a new tab on mobile.

Does anyone know how I can resolve this?

The code I have written to make this work is:

var _sTarget = '_blank';
var _nWidth = application.getScreenWidth();
if (_nWidth < 1200) {
	_sTarget = '_self';
}
application.showURL(_recLogCheckoutSession.stripe_url, _sTarget);

Thanks in advance! :smiley:

Alex

Most browsers will consider that a popup and block it. You may have already allowed it on your desktop browser. Check for a notification to the right of the URL in the browser.

On desktop, try launching it in a browser you don’t usually use and see if it is also blocked by default.