EasyUI Forum
May 17, 2024, 09:09:48 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: combobox problem  (Read 6259 times)
tony11
Newbie
*
Posts: 4


View Profile
« on: January 18, 2014, 07:43:11 AM »

I have a simple combobox, and it works as expected :

Code:
<select class="easyui-combobox" id="tcia1Browser">
  <option value=""></option>
  <option value="ie">Internet Explorer</option>
  <option value="ff">Firefox</option>
  <option value="other">Other</option>
</select>

Then I generate the same with jquery :

Code:
var the_html = 
'<select class="easyui-combobox" id="tcia1Browser" name="tcna1Browser"> ' +
'  <option value=""></option> ' +
'  <option value="ie">Internet Explorer</option> ' +
'  <option value="ff">Firefox</option> ' +
'  <option value="other">Other</option> ' +
'</select>';

$('#tcia1').html(the_html);

Now a default combobox appears, it is no longer styled with EasyUI.
Do I have to add some kind of refresh/redraw in javascript?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 19, 2014, 07:30:35 AM »

Please try this:
Code:
$('#tcia1').html(the_html);
$.parser.parse('#tcia1');
Logged
tony11
Newbie
*
Posts: 4


View Profile
« Reply #2 on: January 20, 2014, 10:34:52 AM »

Indeed, now everything is ok.
Thanks very much.
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!