facebook

JavaScript – Combo Box : CLOSED

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

    gbwiii
    Member

    I am new to using the combo box and JavaScript – I would like to use the combo box to simply jump to whatever page they select on the combo box, can someone provide me the code I would enter in the Run JavaScript field.

    Thanks

    #350347 Reply

    Code_A
    Member

    Something like this should work:

    var page = $('select[name="combobox1"]').val();
    phoneui.gotoScreen('m1-' + page);
    #350348 Reply

    gbwiii
    Member

    Thanks – Not working, do I have to change settings in the combo box in the value column to match JavaScript code ?

    #350349 Reply

    gbwiii
    Member

    Tired this in script

    var page = $(‘select[name=”combobox1″]’).val();
    phoneui.gotoScreen(‘m1-‘ + Page-1);
    phoneui.gotoScreen(‘m1-‘ + Page-2);

    And added these page names in the value column in the combo box

    #350350 Reply

    Code_A
    Member

    Yes the value in the combo box should match the page name.

    Are you using a multipage widget or multiple mobi files? Make sure to add your mobi files to the additional project files area. If you’re using multipage widget, you have to use different code to navigate to the next page.

    Share your file if you still can’t get it working. I did not test the code above, but that should be how you do it.

    #350351 Reply

    gbwiii
    Member

    I added the file since I not sure what your asking.

    Thanks for your time

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

    Code_A
    Member

    Here you go:

    var page = $('select[name="combobox1"] :selected').val();
    phoneui.gotoMultiPagePage('m1-Freemasons-multiPage1', 'SET_PAGE', 'm1-Freemasons-' + page, 'NONE');
    Attachments:
    You must be logged in to view attached files.
    #350353 Reply

    gbwiii
    Member

    Thank you very much – wouldn’t have never came up with that solution !!

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: JavaScript – Combo Box : CLOSED

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