facebook

page transition logic

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #324567 Reply

    thefenex
    Member

    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;

    }

    #324678 Reply

    thefenex
    Member

    thank you… I was able to get my code working…

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: page transition logic

You must be logged in to post in the forum log in