Show Posts
|
|
Pages: [1] 2
|
|
1
|
General Category / EasyUI for jQuery / Re: how to add dynamically combobox from database
|
on: March 22, 2019, 12:27:00 AM
|
EasyUI controls can't be creaded by just appending the html tags after DOM is fully loaded, you have to re-create it with the javascript after appending html tags. Plese try this in you ajax call success function. document.getElementById('mybody').innerHTML =data[0].model; $("[name='dataku']").combobox();
Ok thanks 
|
|
|
|
|
2
|
General Category / EasyUI for jQuery / how to add dynamically combobox from database
|
on: March 21, 2019, 08:44:32 PM
|
i want add combobox-easyui dynamically into my page, when i refresh will read my database and show combobox-easyui <html> <script> $(document).ready(function(){ $.ajax({ async: false, type: "POST", url:"testFunc.php", data: "proses=1", dataType: "json", success: function(data) { document.getElementById('mybody').innerHTML =data[0].model; }, error : function() { }, complete: function() { } }); }); </script> <body> <div id="mybody">
</div> </body> </html>
testFunc.php if (isset($_POST)){ $qstring = "select * from coba"; $rs = mysqli_query($conn_login,$qstring);
$items = array(); while($row = mysqli_fetch_object($rs)){ array_push($items, $row); } echo json_encode($items); }
table coba just 1 record and 1 field with name "model" as text type model field contain : <input name="dataku" class="easyui-combobox" data-options=" valueField: 'label', textField: 'value', data: [{ label: 'java', value: 'Java' },{ label: 'perl', value: 'Perl' },{ label: 'ruby', value: 'Ruby' }]" />
the problem my page just show textbox standar html not combobox-easyui, plase help me how to fix this Thanks
|
|
|
|
|
4
|
General Category / General Discussion / [Solved]- Handle submit response
|
on: May 07, 2016, 05:03:46 AM
|
|
i have problem with submit respone, here my code
data.php $arr = array ('message'=>'<b>Message sent successfully.</b>',success=>true); echo json_encode($arr);
index.php <form id="ff" method="post"> </form>
<script type="text/javascript"> $('#ff').form('submit', { url:"data.php", success: function(data){ console.log(data); var data = eval('(' + data + ')'); // change the JSON string to javascript object if (data.success){ $.messager.show({title:'Message',msg:data.message}); } } }); </script>
in console log show: <b>Message sent successfully.<\/b>
I need Output in bold text: Message sent successfully
i need help.. Thanks
|
|
|
|
|
5
|
General Category / General Discussion / Re: how to show character space on easyui-datagrid
|
on: April 25, 2016, 05:46:47 PM
|
Just replace the spaces in the field "NAME" by a non-breaking space (= ) as mentioned above but also by any other character(s) for your choice.
while($row = mysql_fetch_object($rs)){ array_push($items, $row); }
becomes
while($row = mysql_fetch_object($rs)){ $row['NAME']=str_replace(' ', ' ', $row['name']); array_push($items, $row); }
it's working.. thanks a lot
|
|
|
|
|
6
|
General Category / General Discussion / [SOLVED] how to show character space on easyui-datagrid
|
on: April 25, 2016, 02:00:03 AM
|
|
source table mysql : people CODE | NAME A1 | AGUS => with 0 space A2 | A GUS => with 1 space A3 | A GUS => with 2 space A4 | A GUS A5 | A GUS A6 | A GUS
file : getdata.php // total rec data $rs = mysql_query("select count(*) from people"); $result["total"] = mysql_result($rs,0);
// get detail data $query="select * from people"; $rs = mysql_query($query) or die(mysql_error());
//get into format json $items = array(); while($row = mysql_fetch_object($rs)){ array_push($items, $row); } //total keseluruhan isi data $result["rows"] = $items; echo json_encode($result);
data.php <table id="serie" title="Browse" class="easyui-datagrid" style="width:400px;height:250px" data-options="url:'getdata.php',fitColumns:true,singleSelect:true">> <thead> <tr> <th field="CODE" width="100">CODE</th> <th field="NAME" width="100">NAME</th> </tr> </thead> </table>
result datagrid : CODE | NAME A1 | AGUS => with 1 space A2 | AGUS => with 1 space A3 | AGUS => with 1 space A4 | AGUS => with 1 space A5 | AGUS => with 1 space A6 | AGUS => with 1 space
any one can help me i want show like source : A1 | AGUS => with 0 space A2 | A GUS => with 1 space A3 | A GUS => with 2 space A4 | A GUS => with 3 space A5 | A GUS => with 4 space A6 | A GUS => with 5 space
Thanks
|
|
|
|
|
8
|
General Category / EasyUI for jQuery / Re: How to disable validatebox
|
on: June 25, 2015, 07:10:52 AM
|
The novalidate property only disable the validating action, it can not disable the element.
Oh ok.. I'm find solution to disabled that element: <script> $(function(){ $('#test).prop('disabled',true); }); </script> <html> <input Id='test' class='easyui-validatebox'> </html>
|
|
|
|
|
13
|
General Category / EasyUI for jQuery / problem show placeholder on combobox, when using disable-enable function
|
on: June 20, 2015, 09:36:52 PM
|
im using eayui v1.4.2 example 1: placeholder is show - OK ======================= <html> <input id="kdcust" name="kdcust" class="easyui-combobox" data-options="prompt:'entry nobukti' "> </html> <script> $(function(){ $('#kdcust').combobox('textbox').prop('placeholder', 'entry nobukti'); $('#kdcust').combobox('disable'); $('#kdcust').combobox('enable'); }); </script> example 2 : placeholder not show  ============================================ <html> <input id="kdcust" name="kdcust" class="easyui-combobox"> </html> <script> $(function(){ $('#kdcust').combobox('textbox').prop('placeholder', 'entry nobukti'); $('#kdcust').combobox('disable'); $('#kdcust').combobox('enable'); }); </script> is there a bug on easyui 1.4.2 or something? thanks
|
|
|
|
|
15
|
General Category / EasyUI for jQuery / problem using onblur on easyui-combobox
|
on: June 18, 2015, 07:45:41 AM
|
|
I have problem, this code doesn't work on easyui 1.4.2, but work on 1.3.2, whats wrong with my code..? $(function(){ var tb = $('#addfaktur1_bukti').combobox('textbox'); tb.bind('blur',function(e){ var deptpjx =$('#addfaktur1_dept').combobox('getText'); var gdgpjx =$("#addfaktur1_kdgd").combobox("getText"); $('#addfaktur1_kodeitem').combobox({ onBeforeLoad: function(param){ param.isi = 'kodeitem'; param.gdgpj = gdgpjx; param.deptpj = deptpjx; }, onSelect: function(rec){ }, delay:500, mode:'remote', url:'tranFunc.php', valueField:'text',//id aslinya textField:'text', panelWidth: 350, panelHeight: '200', //bisa 'auto' formatter: FormatKdsup }); }); });
|
|
|
|
|