J.P.A.L.

 

verifyAccess

Page history last edited by Anonymous 2 yrs ago

verifyAccess

 

This function implements VerifyAccess from the API, and basically makes sure that everything is running smoothly.

 

jpal.verifyAccess(handler);

 

handler is the function verifyAccess calls after it runs.

 

verifyAccess is different from other JPAL functions because the "handler" doesn't actually handle any objects. Instead, it is called with no parameters. However, verifyAccess itself does set a few variables, status and functionList, which are available globally.

 

These variables are available globally because verifyAccess doesn't actually make an API call after the very first time it is called. The assumption is that on a given page load, there's no reason to make multiple API calls for something that probably won't change in such a short timespan.

 

All of JPAL's API functions call verifyAccess before running, so you usually don't need to call it unless you need to manually get status and functionList yourself.

 

Example:

 

function returnStatus() {
alert(jpal.status);
}
jpal.verifyAccess(returnStatus);

Comments (0)

You don't have permission to comment on this page.