I have a field scripted to open an instance of a revBrowser object and display web-based PDFs. I need a card or stack script to close the revBrowser object upon closing the card or stack or clicking another item in a locked list field on the same card. I have successfully closed the object with the following script for a button on the same card as the opened revBrowser.
Code: Select all
global gBrowserID
on mouseUp
revBrowserClose gBrowserID
end mouseUp
But when I use the same script (substituting closeCard or closeStack handlers respectively, for the mouseUp handler) for the card or stack and navigate to another stack and then return, the revBrowser object is still open and I don't understand why or know how to close it with a card or stack script. In the Dictionary entry for revBrowserOpen I see the following statement: "It is currently possible to cancel browser operations by setting the browserCancel global variable to true." Is cancelling "browser operations" the same thing as closing the revBrowser object, or does it have the same result? If so, how do I use this global variable? I don't know what I am overlooking. Thanks for any suggestions or pointers.
Monty