EasyUI Forum
May 04, 2024, 06:38:57 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: possible bug in combobox  (Read 11165 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« on: December 03, 2012, 02:40:39 PM »

making combobox with 3 options: equal, greater than and contains:
using following code:
<select name="selector" id="selector" class="easyui-combobox"><option selected="selected" value="0"></option><option value="1">=</option><option value="2">>=</option><option value="3">><</option></select>
when the users select option 2 the combobox display &gt,=
same thing with selection 3, the combobox displays &gt,&lt,
seems to me that is a html entities problem.
please correct me if I'm wrong, and let me know if any chance to solve it...
thanks in advance,
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 03, 2012, 08:55:56 PM »

Try the following code to solve this escaping issue.

Code:
<select name="selector" id="selector" class="easyui-combobox"
data-options="onLoadSuccess:function(){
var tmp = $('<div/>').appendTo('body');
var rows = $(this).combobox('getData');
for(var i=0; i<rows.length; i++){
tmp.html(rows[i].text);
rows[i].text = tmp.text();
}
tmp.remove();
}">
<option selected="selected" value="0"> </option>
<option value="1">=</option>
<option value="2">>=</option>
<option value="3">><</option>
</select>
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!