facebook

combobox

💡
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 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #335170 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.

    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

    #335187

    Hi thamilton1957,

    Seems that you already see the solution that I suggested in this thread: http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=4708

    The second code that you share should be in the phoneui.documentReadyHandler function.

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

    Boogie here, where do I find this function to place the code. I looked under tools and source file. Unable to locate

    #335190

    Ok found it under Resource monitor, looking for the insertion point…..

    #335191

    @thamilton1957,

    this function is located at your <appname>_custom.js file. Let me know if you need further assistance.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: combobox

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