In this video tutorial, I show you a solution to a question from the Adobe forums. The user wants to open a link to a web URL in a new window but doesn’t want all the gobbledygook that comes with a modern browser (no tabs, no menus, no bookmark bars, etc.). I did some research and learned a little about the window.open() command in JavaScript. It works well. I managed to get it to work for a couple of scenarios in this training.
Patreon subscribers can download a copy of the project file I created for this tutorial for free. https://www.patreon.com/posts/awesome-popups-28331374
Here is the URL of the website where I learned about the Window.open JavaScript command. https://www.w3schools.com/jsref/met_win_open.asp
Thanks to CDubber for the question that inspired this video.
Great tutorial as usual. The only thing is that I don’t recommend using Captivate javascript window. The best idea (even for small chunks of code) is to use a proper editor like Brackets (or any other one from a big variety on the market) and then copy a code into the Captivate editor.
Good tip Piotr. Yes, I started using Brackets as my editor of choice for any coding work, even if the Javascript ends up in Captivate. Great features to make sure your scripts are written properly.
Thank you for the video .
Is it possible if a user clicked to the next slide it would close the popup window?
Not using any method I’m aware of.
w3schools.com is a great resource.
I agree.
Thanks Paul.
I have already broken it down into steps in my notebook for future reference. I just used to use the inbuilt option but I like this better as I have had requests for something similar in the past and did not consider using javascript to open a clean browser window.
I haven’t fully tested it in enough environments to know how foolproof it is with corporate environments and various LMS but it seems to work well.
Thanks, Paul!
How can I use the javascript to create a moveable popup window within a slide so the learners can use it as a reference while taking a test? In addition, I would like them to click the X to close the window when they are done using it.
Many thanks
fayek60283005 The user should be able to drag the new window anywhere around the screen and close it out with x as it is as the window does not open in a single static location.
Thanks Paul…very informative and I am pretty sure this will come in handy in one of my projects
You’re welcome.
I like it, Paul.
I am pretty sure I can make use of that somewhere.
Thanks Greg.