facebook

Where to place code to call webservice

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    Craig11
    Member

    Moved from Examples, HOW-TOs forum
    Quick question here…

    I need to call a webservice to get data and populate a page. I need to call this function when the user gets transitioned to the page (not when the page loads in memory). Where do I place the code to do this?

    Page 1 –> Page 2

    Need to call webservice when ‘viewing’ Page 2 . Something similar to $(document).ready(handler).

    Thanks.

    #328530

    Hi Craig11,

    You can put your code on the phoneui.postPageTransition function. Something like the next code should works:

    phoneui.postPageTransition = function(newPageId) {
    
        if(newPageId=='#m1-screen2'){
            alert("welcome to screen 2");
        }
    }//postPageTransition 
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Where to place code to call webservice

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