Forum Discussion
STORYLINE : Opening a link in a new tab but without redirecting the learner to it
When we click on a link, we are redirected to a new tab, which causes us to leave the e-learning module page. I am concerned that the learner may not return to the e-learning page to finish it. Would it be possible that, when clicking on the link, it opens a new tab but without redirecting to it, so that the learner stays on the e-learning module page?
5 Replies
- KennyDyer-44519Community Member
There's a built-in way to do this without using JavaScript. For the hyperlink on a slide, open the object trigger and then select the small "browser options" icon that is located next to the URL when hovering over it. From there, change the Window size to Custom and adjust the width of the window to be smaller (I use width: 1100, height: 800). The small window will now display on top of the bigger course window.
Note: This will not work when using the standard Resources tab functionality. I've created a lightbox slide that acts as the Resources tab.
- ornellaLRCommunity Member
Thanks for this info, I didn't know that :)
However, I'm still looking for a way to open a new tab and not a new window. The goal is to stay focus on the course without being redirected.
- SnorreCommunity Member
You can do it using a javascript trigger:
const url = "YOUR URL"; window.open(url, '_blank');
Or if you want a new tab, and not a new window:
const url = "YOUR URL"; window.open(url, '_blank').focus();