Scope of javascript in Captivate script windows
I'm obviously missing something fundamental here. I found an example which purported to be an implementation of cookies in Captivate, which involved appending some javascript to standard.js in the Templates/Publish subfolder under Captivate's area inside Program Files on my machine. But I couldn't get it to work. That's one problem: Captivate didn't seem to know about any of that code in the published project.
So then, I thought, OK, I'll actually copy and paste the code right into the On Enter action on slide 1 where, in the original example's Captivate file, there was already a script doing part of the work of trying to generate and retrieve the cookies. I thought "surely THIS will work". Well, none of it works. Sitting at a pause in slide 1, I used the Console in Chrome to try to find any of the functions or the single var I tried to create on entry into slide 1 attached to the window object, but none of them were there! Which drives me to ask: what is the scope of the code entered into a script window? I would have thought it would add those objects to the window object for at least SOME period of time. Does it work at ALL to define global functions/variables in there? If so, how long will they persist? Where am I going wrong? Someone please clarify this issue for me!
