Skip to main content
April 30, 2009
Answered

Is it possible to launch a pop-up window

  • April 30, 2009
  • 2 replies
  • 3835 views

I have tried all sorts of code snippets but so far nothing is working, is it possible to launch a popup window from a transparent button within Adobe Captivate 4.  Or any other way to have a learner click on a link or graphic to open a pop-up window?

Thanks -

Manola

    This topic has been closed for replies.
    Correct answer Captiv8r

    Hi all

    This is possible but not without using some JavaScript to do it. You are best off if you insert the script into the HTML code of the wrapper file Captivate creates. You will probably need to declare a function and insert the script into the function. Then inside Captivate, insert a Click Box or a Button object and program it to Execute JavaScript. From there you would insert the function name you created in the HTML wrapper file.

    What was mentioned in the last post was using the Open URL or File option. This could work, but you would likely need to ensure the option was selected to open the link in a new window.

    Cheers... Rick

    2 replies

    chopper523
    Known Participant
    April 30, 2009

    I have done this with buttons. In your button properties you have the option "If user clicks on the button:" one selection should be "Open URL or file". Once this is selected you'll get another text entry box where you can put the URL and if they click the button, the browser will open to the URL you specified. I haven't tried doing this with any of the transparent options. So not sure if you can force a URL open, but that would be something handy to play with and see if it would work.

    Captiv8r
    Captiv8rCorrect answer
    Brainiac
    April 30, 2009

    Hi all

    This is possible but not without using some JavaScript to do it. You are best off if you insert the script into the HTML code of the wrapper file Captivate creates. You will probably need to declare a function and insert the script into the function. Then inside Captivate, insert a Click Box or a Button object and program it to Execute JavaScript. From there you would insert the function name you created in the HTML wrapper file.

    What was mentioned in the last post was using the Open URL or File option. This could work, but you would likely need to ensure the option was selected to open the link in a new window.

    Cheers... Rick

    Inspiring
    June 12, 2009

    I did that, as i am very familiar with that message. Initially, i had forgotten to fix the safety settings and I got the message to do so. So i to Adobe's site and indicate the folders that were safe. I am not getting the message anymore but popup is still not launching. Interestingly, if i use Captivate's launch url option, it launches the window but not resized, which is what i am aiming for.


    OK. Here is the message i am getting from IE (in Firefox I get nothing. the button simply does nothing)

    Line: 12

    Char: 2

    Error: Invalid argument.

    Code:0

    HEre is the code in the page (line 12 is window.open.....)

    <!-- Copyright [2008] Adobe Systems Incorporated.  All rights reserved -->
    <!-- saved from url=(0013)about:internet -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>powersystemsample</title>
    <script src="standard.js" type="text/javascript"></script>
    <SCRIPT language="javascript">
    function popWindow(someaddress) {
    window.open(someaddress,'My Window','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=400');}
    </script>
    </head>

    <body   bgcolor="#1C1C1C">
    <center>
         
    <div id="CaptivateContent"> 
    </div>
    <script type="text/javascript">
        var so = new SWFObject("powersystemsample.swf", "Captivate", "1040", "590", "8", "#CCCCCC");
      so.addParam("quality", "high");
      so.addParam("name", "Captivate");
      so.addParam("id", "Captivate");
      so.addParam("wmode", "window");
      so.addParam("bgcolor","#1C1C1C");
      so.addParam("menu", "false");
      so.addVariable("variable1", "value1");
      so.setAttribute("redirectUrl", "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash");
      so.write("CaptivateContent");
    </script>
        

    <script type="text/javascript">
      document.getElementById('Captivate').focus();
      document.Captivate.focus();
    </script>
    </center>
    </body>
    </html>

    chopper523
    Known Participant
    April 30, 2009

    Do you mean a browswer pop-up or a separate captiate window?

    April 30, 2009

    I would like a browser pop-up window that can be left open or moved around on learners desktop outside of Captivate.