trying to check the local storage for a value and then directing the page transition based on the result…
working with this code… not sure if this is even the right way to go about it… new to javascript… any comments? Thanks!
phoneui.prePageTransition = function(currentPageId,targetPageId) {
// add custom pre-transition code here
// return false to terminate transition
if (targetPageId == “m1-view_ecp”) {
var keyECPFirstName = ‘ecp_first_name’;
var dataECPFirstName = localStorage.getItem(keyECPFirstName);
else if (dataECPFirstName == “”) {
phoneui.gotoPage(‘m1-add_ecp’, ‘DEFAULT’);
} else
phoneui.gotoPage(‘m1-view_ecp’, ‘DEFAULT’);
}
return true;
}