When does setting a checkbox take effect relative to the associated action ?
Hi,
I've got a single checkbox assigned to the field EnableFullScreen. The JavaScript action that handles the checkbox is as follows:
if(EnableFullScreen.isBoxChecked(0) == true)
app.fs.isFullScreen = true;
else
app.fs.isFullScreen = false;
The above code is executed on a Mouse Down event.
When the checkbox is set, I want my PDF to be fullscreen. When the checkbox is not set, I don't want my PDF to be fullscreen.
The code above is doing the opposite of this. Not checked = fullscreen, checked = not fullscreen.
It is behaving like, when I evaluate isBoxChecked(0), the checkbox isn't actually checked yet. Hence, my question about when setting a checkbox actually takes effect relative to the code which is executed in response to the Mouse Down event. If I check a checkbox, should isBoxChecked(0) already be true when I get to the above Mouse Down JavaScript for that checkbox?
Or is there some delay in actually setting the checkbox such that, when the above code is executed, the checkbox won't actually be checked yet?
Thanks for your help with this.
Dave
