EasyUI Forum
December 21, 2025, 07:07:22 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Reducing HTML code in comboboxes  (Read 8731 times)
y.bykov
Newbie
*
Posts: 49


View Profile
« on: April 04, 2017, 02:48:52 AM »

I have two combobox with loaded data (almost 10000 rows, same data).
Is it possible to config combobox(es) to reduce html code and create/using only one DIV combo-panel?
Thank you!
« Last Edit: April 04, 2017, 11:51:06 PM by y.bykov » Logged
jarry
Administrator
Hero Member
*****
Posts: 2305


View Profile Email
« Reply #1 on: April 04, 2017, 08:08:22 AM »

You can call 'cloneFrom' method to create combobox components that will share the same drop-down panel.
Code:
<input id="cc" class="easyui-combobox" style="width:200px;" data-options="
    url:'combobox_data1.json',
    method:'get',
    valueField:'id',
    textField:'text',
    panelHeight:'auto'
    ">
<input class="c1">
<input class="c1">
<input class="c1">
<input class="c1">
<script type="text/javascript">
  $(function(){
    $('.c1').combobox('cloneFrom','#cc');
  })
</script>
Logged
y.bykov
Newbie
*
Posts: 49


View Profile
« Reply #2 on: April 06, 2017, 10:24:09 AM »

Thank you!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!