EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: zh_CN on May 11, 2014, 07:16:04 AM



Title: (resolved) form.serialize() can't get the combotree and combobox!
Post by: zh_CN on May 11, 2014, 07:16:04 AM
Code:
<input id="pid" name="pid" value="{$info.pid|default='0'}"/>
...
$('#pid').combotree({
    url: '/admin.php?s=/MDepartment/getJson',
    loadFilter: treeFilter,
    required: true
});
$('#level').combobox({
    data: dl.level,
    //required: true
});
$('#status').combobox({
    data: dl.status,
    //required: true
});
...

    var query = form.serialize();

 alert(query);  // can't display pid name and value
    $.post(target,query).success(function(data){

I use form.serialize() to get the form data!

alert print:
name=%E5%89%8D%E9%BB%84%E5%BA%97&tel=0519-89681772&addr=%E5%89%8D%E9%BB%84%E9%95%87%E6%99%AF%E5%BE%B7%E8%A5%BF%E8%B7%AF52%E5%8F%B7&Location_X=0.000000&Location_Y=0.000000&sort=17&id=17
 alert(query);  // can't display the "pid" name and value (like ...pid=100&...)

I have resolved, the form tag position error!