EasyUI Forum
December 05, 2025, 01:05:11 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  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.

Code:
document.getElementById('mybody').innerHTML =data[0].model;
$("[name='dataku']").combobox();

Ok thanks Smiley
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

Code:
<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>
Code:
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);
}
Code:
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
3  General Category / General Discussion / Re: Handle submit response on: May 08, 2016, 09:35:52 AM
You just need to call:
Code:
$.messager.show({title:'Message',msg:'<b>'+data.message+'</b>'});

Ok - 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.&lt;\/b&gt;

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 (=&nbsp;) 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(' ', '&nbsp;', $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
7  General Category / General Discussion / Re: Need .chm file on: September 22, 2015, 06:31:23 PM
Try this :
http://www.4shared.com/file/_4pdxt3Ece/EasyUI_v143.html
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>
9  General Category / EasyUI for jQuery / Re: How to disable validatebox on: June 25, 2015, 02:31:48 AM
The 'disabled' property does not supported in the validatebox plugin, please use the 'novalidate' property instead.
Code:
$('#unitId').validatebox({
  novalidate:true
});

i have try and still can not disabled..
10  General Category / EasyUI for jQuery / Re: How to disable validatebox on: June 22, 2015, 09:43:37 PM
<input type id="unitId" name="unit"></input>

<script type="text/javascript">
    $('#unitId').validatebox({
         disabled: true
    });
</script>

it's not work for me, im using easyui 1.4.2
11  General Category / EasyUI for jQuery / Re: problem show placeholder on combobox, when using disable-enable function on: June 22, 2015, 06:17:06 AM
You don't need to change its 'placeholder' attribute. Please use the 'prompt' property instead.
Code:
<input id="kdcust" name="kdcust" class="easyui-combobox" prompt="entry nobukti">


Ok thanks
12  General Category / EasyUI for jQuery / Re: problem using onblur on easyui-combobox on: June 20, 2015, 09:37:51 PM
Ok thanks
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 Sad
============================================
<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
14  General Category / EasyUI for jQuery / Re: BUTTON FOCUS on: June 18, 2015, 08:09:19 AM
try this
$('#button').next().find('input').focus();
or
$('#button').focus();
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
         });         
      });
});
Pages: [1] 2
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!