JavaScript does not appear while you preview Adobe Captivate output.

If the Execute JavaScript option is selected as action in the Project End options of the Project Preferences dialog box (Edit > Preferences > Project > Start and End (Windows) or Adobe Captivate > Preferences > Project > Start and End (Mac OS)), Adobe Captivate may not display an error message when the JavaScript is previewed. This is because the Show Borders option as set to On (enabled), by default. When this option is on, Adobe Captivate creates multiple SWF files—skin SWF files and content SWF files.

To preview JavaScript, set the value of the Show Borders option to Off (disable it) in the Borders tab of the Skin Editor.