correohs
Newbie
Posts: 11
|
|
« on: February 06, 2013, 02:33:08 PM » |
|
How to does combobox works with dosearch?
lo_month_sel means layout month selected lo_empl_id_sel means layout employee ID selected
Thanks!
function doSearch(){ $('#dg').datagrid('load',{ lo_month_sel: $('#lo_month_sel').val(), lo_empl_id_sel: $('#lo_empl_id_sel').val() }); }
<? /* -------- this part works great! -------------------------- */ $curr_month = date("m"); $lo_month_sel = array (0=>"All", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $select = "<select id=\"lo_month_sel\">\n"; foreach ($lo_month_sel as $key => $val) { $select .= "\t<option value=\"".$key."\""; if ($key == $curr_month) { $select .= " selected=\"selected\">".$val."</option>\n"; } else { $select .= ">".$val."</option>\n"; } } $select .= "</select>"; echo $select;
?>
/* ----------------------------------------------------- This Part Do Not works well for me --------- */ <span>Empl ID:</span> <? input id="lo_empl_id_sel" class="easyui-combobox" name="lo_empl_id_sel" data-options=" url:'get_empl_dropdown.php', valueField:'emp_code', textField:'emp_last_name', panelHeight:'auto', required:true "> <a href="#" class="easyui-linkbutton" plain="true" onClick="doSearch()">Search</a>
|