Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorMilo Dodds
    • CommentTimeOct 30th 2008
     
    Hello E-Learning Development Folks,

    I am trying to figure out how to launch a specifically sized window from a transparent button within Captivate3. What's the best way to do this? So far I can't get any Javascript to work within Captivate.

    Attached are my files that is a modification of the approach I found on Pipwerks website...using the identify("launchcourse"); and identify("launchnavigation"); from a .cp file that has two buttons on a single slide that I am using as a launch screen. I didn't add the .cp file but it's just like the MarioBrothers .cp file except I am using AICC in my publishing of the webpage.

    - Milo
    • CommentAuthorMilo Dodds
    • CommentTimeOct 30th 2008
     
    Here is the function I wrote in the html file (validated with jslint):

    <script type="text/javascript">
    function identify(person){
    var feedback = document.getElementById("feedback");
    if(feedback.value != "launchcourse")
    {window.open("index.html","UDDI Web Services Course","menubar=no,address=no,width=1024,height=825,toolbar=no");}
    else
    {alert("Something is not working properly");}
    if(feedback.value != "launchnavigation")
    {window.open("navigation.html","How To Navigate","menubar=no,address=no,width=1024,height=825,toolbar=no");}
    else
    {alert("Something is not working properly");}
    }
    </script>
    • CommentAuthorphilip
    • CommentTimeOct 30th 2008
     
    hi Milo

    i'm not sure why you're using the Mario example for trying to open a window, as it's kind of a different animal. your code won't work because you're trying to get the value of feedback.value, which you'll never get -- you have no items with an ID of feedback!

    i recommend scrapping the code you have and starting fresh by doing the following:

    1. Add a JavaScript event to your Captivate file (such as on a button). The JavaScript should be something simple like "openWindow()"

    2. You need to have a corresponding openWindow function in your HTML, something like

    function openWindow(){
    window.open("index.html","UDDI Web Services Course","menubar=no,address=no,width=1024,height=825,toolbar=no");
    }


    That's all these is to it.

    Now if you're trying to use the same popup function for two different target HTML files, you'd need to include a branch in the function like so:


    function openWindow(where){

    if(!where){ return false; } //Ensure there is a destination

    var url, title;

    if(where === "launchcourse"){

    url = "index.html";
    title = "UDDI Web Services Course";

    } else if (where === "launchnavigation"){

    url = "navigation.html";
    title = "How To Navigate";

    }

    window.open(url, title, "menubar=no,address=no,width=1024,height=825,toolbar=no");

    }


    Then in your Captivate file you'd modify the JS call to include a string, such as openWindow("launchcourse") or openWindow("launchnavigation").

    - philip

    PS: If you open a course in a popup using the Captivate AICC code, your AICC tracking won't work in a secondary file (the popup triggered by the Captivate button)... the HTML generated by Captivate is only set up to handle tracking for the Captivate SWF in the original HTML, not any additional SWFs in a secondary (popup) window.