EasyUI Forum
June 16, 2024, 04:52:45 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Poll
Question: how to fill this?
i don't know - 0 (0%)
how to us this - 0 (0%)
part - 0 (0%)
of - 0 (0%)
function - 0 (0%)
Total Voters: 0

Pages: [1]
  Print  
Author Topic: combobox not work when using dynamic data  (Read 6079 times)
francy
Newbie
*
Posts: 1


View Profile
« on: February 27, 2016, 06:38:53 AM »

My HTML :
<div>
 行業類別:
        <input class="easyui-combobox" style="width:100px"
                url="get_boss_catlog.php"
                valueField="id" textField="text">
        <a href="#" class="easyui-linkbutton" iconCls="icon-search">搜尋</a>
</div>
The output of "get_boss_catlog.php" like this:(json encoded)
[{"id":1,"text":"連鎖美食","selected":true},{"id":2,"text":"咖啡小點","selected":false},{"id":3,"text":"商品銷售","selected":false},{"id":4,"text":"教育學習","selected":false},{"id":5,"text":"美容養生","selected":false},{"id":6,"text":"專業服務","selected":false},{"id":7,"text":"生活休閒","selected":false},{"id":8,"text":"經銷代理","selected":false}]

But L can't see anything in combobox !!
If i save it to "my.json", and change html as :
<div>
 行業類別:
        <input class="easyui-combobox" style="width:100px"
                url="my.json"
                valueField="id" textField="text">
        <a href="#" class="easyui-linkbutton" iconCls="icon-search">搜尋</a>
</div>
It works!!!!!  
Why ?   Please help me~  Thanks.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 27, 2016, 05:33:35 PM »

Please open the browser's debug tool and switch to 'Network' tab, check carefully to see if the returning data from 'get_boss_catlog.php' is correct.
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!