5 Replies Latest reply on Dec 7, 2007 4:09 PM by jbradley88

    help with closing IE Window

      ok so i published, but when i use the "Execute JavaScript" option on buttons and Click boxes they dont work. how do i create an exit button or icon and get them to execute simple "window.close(); " ?? i know how to do it in HTML but i want captivate to do it .
        • 1. Re: help with closing IE Window
          Captiv8r Adobe Community Professional & MVP
          Hi yrogergrolyat and welcome to our community

          I cannot tell you the number of times I've seen this post appear. The thing is, there is simply no reliable way (JavaScript or otherwise) to make the window close. Too many variables at play. Things like browser type and version.

          The easiest way is to configure your project start and end options. Set the end option to "Close project". Then simply insert a Bbutton or Click Box object that jumps to the last slide. The end result is that your user clicks the object. The last slide appears. And if the window can be closed, it closes!

          Cheers... Rick
          • 2. Re: help with closing IE Window
            yrogergrolyat Level 1
            hey rick thanks a million. i tried messing with the start and ending of my project. does the duration of the slide affect whether or not the window closes ?? the reason im askin is cuz i tried ur suggestion and it still doesnt work.
            • 3. Re: help with closing IE Window
              Captiv8r Adobe Community Professional & MVP
              Hi again

              Yes, the duration could make it seem like it isn't working. By that, I mean if the slide is ten seconds long, the user would have to wait ten seconds before the close would occur or be attempted. So I normally time that slide really short so the action is nearly instant.

              Cheers... Rick
              • 4. Re: help with closing IE Window
                yrogergrolyat Level 1
                thanks man. wat u suggested works but not how i want it to. how do i bring an image ontop of the embedded swf file after captivate has published to HTM. ?? wat im resorting to is to edit the published HTM and put in web controls of my own. is this at all possible do u kno ??
                • 5. Re: help with closing IE Window
                  jbradley88 Level 2
                  Hi yrogergrolyat,

                  Without knowing exactly what you're trying to do, the answer is likely "yes, you must edit the HTM file to make native HTML objects display over the Captivate movie".

                  That said, if you only want your image to display at a certain point in the Captivate movie, you can hide the image initially using an inline or CSS style attribute and then use an Execute Javascript call from Captivate to make the image visible using something like:

                  window.document.getElementById('yourimageIDhere').style.visibility = 'visible';

                  where your image tag looks something like:

                  <image id="yourimageIDhere" style="visibility: hidden">