Hi,
I am trying to call a javascript method(fncApplicationAccess, which has a ajax call and resides in a .js file) from another javascript method "ShowWarning". I need to take decision in the "ShowWarning" javascript method with the return result from the fncApplicationAccess method.
function ShowWarning(appId, ctrl,act)
{
var appAccess = fncApplicationAccess(appId, ctrl,act);
alert(appAccess);
var mode;
if (appAccess == "0")
{
return false;
}
else if (appAccess == "1") // Request for Read Only
{
// Read only not allowed
return true;
}
}
When I execute, alert(appAccess) seems to be called much before the getting the value from the fncApplicationAccess.
Any help will be appreciated.