facebook

Navigate in screens and url with effects

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

    softandarts
    Member

    Hi everybody,

    1) I find this syntax for dynamically navigate in screens with effects:

    phoneui.gotoScreen(‘contacts-screen’, ‘FADE’)

    my screen is named “Officine.mobi”: I change the code in this:
    phoneui.gotoScreen(‘Officine’, ‘FADE’)

    but not run … why ?

    2) Is possible navigate to URL ?
    (this syntax not run:)
    phoneui.gotoURL(‘http://www.softandarts.net’, ‘FADE’)

    Thanks and sorry for my bad english

    Luca

    #340175 Reply

    alabastida
    Member

    When you integrate a call to another mobi Screen, the screen gets embedded in the same html of the start page, so, you need to refer to it by it’s true html id, for example:

    instead of
    phoneui.gotoScreen(‘Officine’, ‘FADE’);

    use the html id of the screen, it would be something like:
    phoneui.gotoScreen(‘m1-Officine’, ‘FADE’);

    Remember, you need to somehow relate the secondary screen you want to call into the main one, the way i do that it’s by adding a button and hiding it somewhere and i give it the action goToScreen to my secondary screen so it gets embedded, in your case Officine.mobi, it’s a little tricky but it works, if anyone knows a better way to do it, please suggest!!!

    Regards!
    Adrian 🙂

    #340176 Reply

    Stu Wade
    Member

    @ Adrian,

    Unless I am missing something, this is exactly the purpose of the ‘Additional Project Files’ entry on the designated start-up screen Properties tab.

    #340177 Reply

    paulD
    Member

    Yep Stu’s right use the additional project files, works a treat.

    Paul

    #349209 Reply

    With the new multiPage widget, the best way to deal with this (in my opinion) is to make the whole app structure of layered multiPages (which solves the whole pages being linked problem), and using the phoneui.gotoMultiPagePage function:

    phoneui.gotoMultiPagePage(widgetId, targetType, pageId, transition)

    widgetId is m1-{id of mobi page}-{id of multipage}
    targetType is ‘SET_PAGE’ if you want to establish a specific page to transition to or these for the dynamic pages:
    FIRST
    LAST
    NEXT_STOP_AT_LAST
    PREVIOUS_STOP_AT_FIRST
    NEXT_CIRCULAR
    PREVIOUS_CIRCULAR

    pageId is m1-{id of mobi page}-{id of page}
    transition is same as it the transition strings for phoneui.gotoScreen

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Navigate in screens and url with effects

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