facebook

Multiple Multipage widgets and Navigation

💡
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 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #341083 Reply

    thomrobbins
    Member

    I have created a project that has two multipage widgets on a form as shown in the tutorial. I realized that for some reason I am not able to link between the different forms and was looking at ways that it can be done with code. I found several examples that showed the following. But not matter what I do they don’t seem to work for me.

    
    phoneui.gotoMultiPagePage('m1-test-multiPage2', 'SET_PAGE', 'm1-multiPage2-page4', 'NONE');
    phoneui.gotoPage('m1-test', phoneui.transitions.slideRight);
    

    What is the best way to navigate on the same page between two multipage widgets? I have included a simple example as well.

    Attachments:
    You must be logged in to view attached files.
    #341086

    Stu Wade
    Member

    It’s a bit ugly, but this works – the trick is to find the correct widget names – you have to dig into the test.html file …

    Replace your button code with:

    phoneui.gotoMultiPagePage('m1-test-page2', 'SET_PAGE', 'm1-test-page4', 'NONE');
    setTimeout (function(){phoneui.gotoMultiPagePage('m1-test-multiPage1', 'SET_PAGE', 'm1-test-page2', 'NONE');},100);
    Attachments:
    You must be logged in to view attached files.
    #341098

    thomrobbins
    Member

    Thanks – that did it!
    What did you look for in the test.htm file that made you able to see this?

    #341099

    Stu Wade
    Member

    I identified the sub-page by its content, “Page 4”, and noted its id and then did the same for the containing multipage structure … As you did not use the tab bar in the second multipage this lead to the names being a little non-standard.

    The timeout is required to give the graphics a moment to catch up with themselves. Other posters have recommended phoneui.preprocessDOM for this, but I can’t seem to get that approach to work for me ….

    Happy coding, and welcome to these boards

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Multiple Multipage widgets and Navigation

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