To call a function, you just write the function name followed by parentheses, with parameters inside the parentheses. You don't put { ... } after it, that's for defining a function.
var pagefunction = function() {
anotherfunction(); // Call the other function
alert("it worked!"); // Alert after the other functioin returns
}
You call this as just:
pagefunction();
In order to use:
pagefunction.anotherfunction();
pagefunction would have to be an object, not a function. That object would have a property named anotherfunction that contains a function.
Or if you wanted to write:
pagefunction().anotherfunction();
pagefunction would have to be a function that returns an object, and that object would have to have a property named anotherfunction that contains a function.