EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: ems2811 on April 06, 2015, 12:14:20 PM



Title: combobox reload
Post by: ems2811 on April 06, 2015, 12:14:20 PM
Hello. Sorry for my English.
Code:
$('#cc').combobox({
valueField: 'id',
textField: 'name',
mode: 'remote',
method: 'get'
});
$('#cc').combo('options').delay=604800000;
$('#cc').combobox('options').selectOnNavigation=false;
$('#cc').combobox('textbox').bind('keyup',function(e){
if (e.keyCode == 40){
var _combo=$(this).parent().prev();
_combo.combobox('reload','/Scripts/get_org.php?org_text='+_combo.combobox('getText'));
_combo.combobox('showPanel');
}
});
Enter text and press "alt" + "keydown" opens a drop-down list and the text in the edit is deleted. Then when you press the "down" there is no move through the panel, but called update (GET request) . Navigating the panel works by pressing the " down " . I do not correct or error in easyui?


Title: Re: combobox reload
Post by: ems2811 on April 10, 2015, 09:18:12 AM
Sorry. Code 40 belongs to the button down. It is only necessary to understand how to pass a combination.
Understood almost everything. Besides why erased text from the edit field in the call combobox ('reload')
Code:
$('#cc').combobox('textbox').bind("keyup",function(e){
if (e.keyCode == 40 && e.altKey){
var _combo=$(this).parent().prev();
var _text=_combo.combobox('getText');
_combo.combobox('reload','/Scripts/get_lpu.php?lpu_text='+_text)
_combo.combobox('showPanel');
}
});