facebook

Combobox question

💡
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
  • #335144 Reply

    I’m using the combox feature to create a Schedule with three different combo boxs.
    One for the site location and two others for start time and stop time.
    Problem: when I close the app and return the combobox defaults back to the selected item.
    How do I keep what was selected untill I change it, and stay there when I exit the app.

    #335145

    I found this on the help site:

    OK i know where the onclick code goes, but where does the second set of code go?

    The code for the onclick change should be this:

    Code:

    localStorage.setItem(“val”,$(‘select[name=”combobox1″]’).val());

    Note that “val” is the key for the saved value.

    That value will be pulled with the second code I posted last time:

    Code:

    var cmbLastVal = localStorage.getItem(“val”);
    $(‘select[name=”combobox1″] option[value=”‘+cmbLastVal+'”]’).attr(‘selected’,’selected’)
    phoneui.preprocessDOM(‘#m1-combo_localStorage’);

    _________________
    Octavio
    Genuitec Mobile Team

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Combobox question

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