Skip to main content
Inspiring
Oct 26, 2022 8:41 PM UTC
Question

Can I use javascript to open a URL?

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 is closed to new replies. Start a new post to keep the conversation going.

    2 replies

    Stagprime2687219
    Legend
    Oct 26, 2022 9:02 PM UTC

    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.

    Translate
    Inspiring
    Oct 27, 2022 5:15 PM UTC

    First, thank you for your suggestion.

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

    Thanks again!

    Translate