page.checkBeforeLoad
It is fired before the page begins loading. Good for checking if it is possible to go to this page, or we have to skip it. Important: controllers of the page are unavailable within this function.
Parameters
none
Returns
Type | Comment |
---|---|
{Boolean} true | the page is allowed, it will be loaded |
{Boolean} false | the page isn’t allowed, go to next page instead |
{String} the page isn’t allowed, go to |
|
Example
We have special offers to women, we want to show this page only for them.
$('page_for_women').checkBeforeLoad = function() {
return vcc.isSelected('gender', 'female', 'export_value');
};
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.