EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aswzen on December 02, 2015, 12:53:38 AM



Title: Cancel all request made by Combobox remote mode before the last one [NOT SOLVED]
Post by: aswzen on December 02, 2015, 12:53:38 AM
see this fiddle http://jsfiddle.net/nx7g756d/

If you write something fast example "12 34 56 78"
then there will be more than 3 request to the server

(http://i.imgur.com/uKT2Fwm.jpg)

it will eat huge memory on server PC.  :-\

or can i just cancel all AJAX request that combobox made except the last one?

see this autocomplete plugin https://github.com/devbridge/jQuery-Autocomplete
the plugin above they have smart system that cancell all request made before the last one so the server not be flooded by request

(http://i.imgur.com/4D5m98w.jpg)

Thank you in advance


Title: Re: Search delay on combobox remote:'mode' / Cancel all request made before the last
Post by: jarry on December 02, 2015, 01:23:27 AM
Please try to set a bigger 'delay' value for the combobox.
Code:
<select 
        class="easyui-combobox"
        id="ITEM_ALIAS_ID"
        style="width:250px"
        data-options="
                      url:'google.com',
                      mode:'remote',
                      method:'post',
                      panelWidth:500,
                      delay:600,
                      valueField:'ITEM_ALIAS_ID',
                      textField:'ITEM_ALIAS_NAME'
                      "
        style="width:300px;">
</select>


Title: Re: Search delay on combobox remote:'mode' / Cancel all request made before the last
Post by: aswzen on December 02, 2015, 01:29:00 AM
ok but i deal another problem

how to cancel all request made before the last request?
because if not all request will flood the server.

but thank you for the answer


Title: Re: Cancel all request made by Combobox remote mode before the last one [+PIC]
Post by: aswzen on January 27, 2016, 12:05:05 AM
please consider to fix this problem in next update