EasyUI Forum
April 28, 2024, 12:33:48 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Combox bug  (Read 13400 times)
TayYeh
Newbie
*
Posts: 4


View Profile Email
« on: April 19, 2012, 03:56:19 AM »

<select id="cc" class="easyui-combobox" name="state" style="width:200px;" required="true">
   <option value="1">test1</option>
   <option value="2">test2</option>
   <option value="3">test3</option>
</select>
 <script>
   $(document).ready(function () {
      $('#cc').combobox({
         onSelect:function(n,o){....},
         onChange:function(n,o){....}
      });
   }
</script>

1.if combobox is selected "test1" item, then input "1". don't have any event.

2.if  combobox is selected "test1" item,use [getValue] will get "1".
   if input "1" ,use [getValue] will get "1".
   they are same!!
   I think, command must explicit.
   It is better, if have [getSelectedValue],[getSelectedText],[getText] command.
   When change select, [getSelectedValue] = itesm.value, [getSelectedText] = item.text, [getText] = null
   When input text, [getSelectedValue] = null, [getSelectedText] = null, [getText] = input text
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!