Problem Displaying a URL in a new tab

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Problem Displaying a URL in a new tab

Post by rocketman »

Having a problem using DISPLAY URL BO.URLSTRING, in that it will display ok in a new WINDOW (beautifully in fact), but won't display in a NEW TAB 'Tabname'

The url in question is a link to a discord Voice Channel if that makes any difference. It would be nice to be able to keep the connection "in app" The link in question is something like (but don't try it because I would need to send you a server invitation, and anyway, I've changed some numbers)
https://discord.com/channels/1129917590 ... 9999999999

Any ideas?
Rocketman

V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
joben
Posts: 230
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Problem Displaying a URL in a new tab

Post by joben »

In my experience, embedding sites via iframes rarely works out of the box these days due Content Security Policies.
I don't claim to know how this works, but it could be a clue.
Regards, Joakim

Image
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Re: Problem Displaying a URL in a new tab

Post by rocketman »

I’m not knowingly using an iframe - unless AIM builds on in the background. It’s just the built in

DISPLAY URL urlstring NEW TAB ‘tab name ’

But thanks for the response
Rocketman

V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Problem Displaying a URL in a new tab

Post by Jaymer »

have you emailed Vlad directly reporting this as a Bug?

It seems odd (to me) that the Syntax "IN NEW WINDOW", "IN CURRENT TAB" (and 1 other, can't remember) use the "IN" keyword,
but when he added "NEW TAB" its not "IN NEW TAB".
Why just NEW TAB if its also
IN CURRENT TAB ?

You only say "won't display" when using "NEW TAB" - but what happens?
A blank Tab? Was there network traffic? What does the developer console show?

Perhaps its a legit bug in that something is expecting the "IN" part in one place in his internal code, and not in the other.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
joben
Posts: 230
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Problem Displaying a URL in a new tab

Post by joben »

rocketman wrote: Tue Jul 18, 2023 2:59 pm I’m not knowingly using an iframe - unless AIM builds on in the background. It’s just the built in

DISPLAY URL urlstring NEW TAB ‘tab name ’

But thanks for the response
You could try using your own application URL as urlstring to troubleshoot and see if it is CSP (Content Security Policy) that is being annoying.
If it works to display your application inside your application, then it means that it is quite likely that CSP is the issue.
I have actually never used this functionality "NEW TAB", but I assume it works by creating an iframe HTML element.
Regards, Joakim

Image
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Re: Problem Displaying a URL in a new tab

Post by rocketman »

@jaymer @joben

I suspect it's a security policy thing. I don't get a blank tab, I actually get a grey background with a sad face icon (although I had to scroll down half a mile to find the face). And yes there is a small amount of network traffic. Anyway, I'm just boning up on the Discord developer API's - there may be a better solution. For now I can just use IN NEW WINDOW and everything works fine Fortunately Discord also has a Browser interface as well as an app. Not elegant (the solution - not the discord browser interface) but it works.

.... and PS New Tab does work with standard websites (if there is such a thing) flightsim.to loads up into a new tab perfectly as does The Met Office. IN NEW TAB throws an error in the configurator
Rocketman

V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
Post Reply