EasyUI Forum
May 04, 2024, 11:51:45 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: in $(function(){} ) combobox method can't call?  (Read 3910 times)
cdtuql
Newbie
*
Posts: 26


View Profile Email
« on: June 18, 2017, 08:49:34 PM »

I have a page that use combobox ,like this:
<input id="ICCardManagement_deposit_department" name="depNo" class="easyui-combobox"  data-options="valueField:'depNo',textField:'depName',url:'${pageContext.request.contextPath}/department/getReallyIdValueList'" />

but in the <javascript></javascript> I use the
   
   $(function(){
          var icinfo=getCardInfoNew();
         $('#ICCardManagement_deposit_department').combobox('setValue',icinfo.jqzbh);
         
         
      });

but the ICCardManagement_deposit_department did not  play up, the jeasyui do not supply the function?


Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: June 18, 2017, 11:58:19 PM »

To initialize the combobox value, you just need to set the 'value' property.
Code:
<input id="ICCardManagement_deposit_department" name="depNo" class="easyui-combobox"  data-options="
value: ...,
valueField:'depNo',
textField:'depName',
url:'${pageContext.request.contextPath}/department/getReallyIdValueList'" />
Logged
cdtuql
Newbie
*
Posts: 26


View Profile Email
« Reply #2 on: June 19, 2017, 11:44:12 PM »

thanks jarry
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!