Storing application state information in the PODSPrefs object
Within the body tag of the master page, the initPage() function is set to execute immediately when the page is loaded:
The initPage() function stores the Customers datastore name in a variable:
An onclick event handler calls a gotoDetailPage() function when it determines the user has tapped a customer row for which the detail page will display more detailed information:
The gotoDetailPage() function takes the parameters that were passed and stores the datastore name and the ID of the customer row that was tapped,
then opens the detail page: