I am using Captivate 6 and in its wonderfully wonky way, is not closing the window with the 'Execute Javascript' command.
However, when I choose 'Execute Advanced Actions' in the properties pane (under On Success) and create an advanced action with the same script, it does close the browser window but not the interactive PDF. I just need to ensure that the script I choose is the closeWindow script and not previously used advanced actions.