facebook

How to open combo spinner programmatically

  1. MobiOne Archive
  2.  > 
  3. Examples, HOW-TOs
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #351531 Reply

    support-michael
    Keymaster

    How To Programmatically Open a Combobox (spinner mode)

    1) add combo and assign a unique id in the properties

    2) add custom javascript function that will select the combo and fire its handlers

    
       //jquery snippet, selects a combo with combobox1 as its name and then fires its click handler(s)
       $('[name=combobox1]').trigger('click');
    

    I tested this approach in the Simulator and on an iphone5/ios7.

    Here is a little example project that demonstrates this technique. The project is attached at the bottom. See attachment design-note1.png

    Example project See attachment open-spinner.zip

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

    Darshan Patel
    Participant

    yeah i had tried this, no luck 🙁

    here is the code

    somefunction(){
    /*
    * some code
    */
    alert(“before”);
    $(‘[name=cmbSearch]’).trigger(‘click’);
    alert(“after”);
    }

    i get both the alerts but the combobox is not triggered…

    i also tried doing the same in the example provided by you, i called the openSpinner() on onChange event of textbox… i worked fine on simulator but dint worked on device…

    can you please provide the code for doing it like this?

    thanks,
    Darshan

    #351544 Reply

    support-michael
    Keymaster

    >can you please provide the code for doing it like this?

    I tested the example project on both the simulator and an iphone. It would be more expedient if you post a small example project (1 screen) that illustrates exactly what you want to accomplish and provides the code you have developed. Also provide details about the device(s) and os versions you will test on.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: How to open combo spinner programmatically

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