Skip to main content
Inspiring
October 26, 2022
Question

Can I use javascript to open a URL?

  • October 26, 2022
  • 1 reply
  • 472 views

First, client demands force me to use an alias to my targeted URL.  If I want the button to load "https://www.mynavyhr.navy.mil/", I have to create a .htm file that contains this:

 

<HTML>
<HEAD>
<TITLE></TITLE>
<meta http-equiv="refresh" content="0; URL='https://www.mynavyhr.navy.mil/'" />
</HEAD>
<BODY>
</BODY>
</HTML>

 

and then point my Captivate button to that .htm file to load the site.  It opens fine in a new tab.

Can I do this with javascript, but open the URL in a new browser window - not just another tab?  The tab has an effect on the main Captivate timeline when I close the tab.

Thanks!!!

 

    This topic has been closed for replies.

    1 reply

    Stagprime2687219
    Legend
    October 26, 2022

    You could try the following on a button

     

     

    window.open("https://www.mynavyhr.navy.mil/", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes");

     

    You'll just set the success action as Execute JavaScript and put the code in the Script Window.

    Hopefully that helps you get going in the right direction.

    Inspiring
    October 27, 2022

    First, thank you for your suggestion.

    Apparently there is a popup blocker that's not permitting the page from opening.

    Thanks again!