page.checkBeforeLoad

Reading Time: 1 minute

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');
};

There are no comments yet.
Subscribe to our newsletter
or Contact us!
Please note that by subscribing to our newsletter, you agree to receive regular email messages from VCC Live® about service related news and updates. By subscribing to our newsletter, you also agree that VCC Live® will use your data in accordance with the applicable Privacy Policy until you unsubscribe from the newsletter.