Hi everyone,
Me again (sorry!).
Quick question, is there a way to get PerchSystem::redirect('http://example.com/'); to open a new window / tab instead of redirecting in the current window / tab? (just like target="_blank" does).
Many thanks
Glen
Hi everyone,
Me again (sorry!).
Quick question, is there a way to get PerchSystem::redirect('http://example.com/'); to open a new window / tab instead of redirecting in the current window / tab? (just like target="_blank" does).
Many thanks
Glen
Unfortunately not, php is server side language so doesn't have the capability to do this.
You would need to use JS to do this, something like window.open("https://openinnewtab.com"); would work
Thanks Byron Fitzgerald
However you do it, make sure that you use rel="noopener noreferrer" on any such links for security reasons. See https://web.dev/external-anchors-use-rel-noopener/