jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList Event for Incremental Search

This topic contains 3 replies, has 2 voices, and was last updated by  Ivo Zhulev 8 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Event for Incremental Search #85498

    VictorRein
    Participant

    I use the Select event of the DropDownList, in order to open another web page.
    Is it possible for me to support “incremental search”? This is where the user types in multiple characters to find the desired row.
    Currently, the user must type very quickly, and it does work, but you really have to type fast.
    Is there a way – maybe a different event? – which would only fire once the user either:
    a) Clicks the desired row, or
    b) Navigates away from the DropDownList?

    Here is my code:
    // Create a jqxDropDownList
    $(“#propfilter”).jqxDropDownList({width: ‘250px’, height: ’20px’});

    $(‘#propfilter’).on(‘select’, function (event) {
    var args = event.args;
    var item = $(‘#propfilter’).jqxDropDownList(‘getItem’, args.index);
    if (item != null) {
    location.href = ‘home.php?userid=5&skey=3D8Dm9nVUNXiwL2zdPL4&prop=’ + encodeURIComponent(item.label); }
    });

    Thank you.
    Victor Reinhart
    GrayMatterLLC

    Event for Incremental Search #85505

    Ivo Zhulev
    Participant

    Hi VictorRein,

    Try the close event and jQuery mouseleave for the navigation away.

    Best Regards,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com/

    Event for Incremental Search #85628

    VictorRein
    Participant

    Thank you. I tried the Close event, and it doesn’t fire at all. Here is how I coded it:

    Old Code:
    $(‘#propfilter’).on(‘select’, function (event) {

    New Code:
    $(‘#propfilter’).on(‘close’, function (event) {

    Is that correct?
    Sincerely,
    Victor Reinhart

    Event for Incremental Search #85775

    Ivo Zhulev
    Participant

    Hi, VictorRein

    Try increasing the value of the incrementalSearchDelay property of the DropDownList.
    Here is its demo:
    http://jsfiddle.net/jqwidgets/k9Mxj/

    Best Regards,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.