To define the variable you need to assign a value to it.
The variable have local scope by default which means that they could not be seen inside the loadpage because there is own local scope inside. It also applies to nested loadpage.
Besides, you could assign the variable with global scope by assigning it with @global directive. Such variable are seen in the whole program starting with the place of assigning to the inside of all loadpages.