EasyUI Forum
September 19, 2025, 01:35:13 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Show many window after click different menu (NOT SOLVED) on: February 28, 2016, 07:32:14 PM
You just follow this to create a window
http://www.jeasyui.com/tutorial/win/win1.php

If you want to load ajax content in windows

Code:
<a href="javascript:void(0)" onclick="$('#w').window('open')">><?=$hasilresult['DisplayNamea'];?></a>

<div id="w" href="<?php echo base_url()?>index.php/<?=$hasilresult['linka'];?>?menunameid=<?=$hasilresult['MenuName_IDa'];?>"  class="easyui-window" title="Modal Window" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:500px;height:200px;padding:10px;">
        The window content.
    </div>

Fren sory,

i get a problem..i want a array result on
<a href="javascript:void(0)" onclick="$('#w').window('open')">><?=$hasilresult['DisplayNamea'];?></a>

#w, i want initial with <?=$hasilresult['MenuName_IDa'];?>. Thank you
2  General Category / EasyUI for jQuery / Re: last update data in datagrid edit dialog box (NOT SOLVED) on: February 14, 2016, 10:13:23 PM
you just put reload function after your updated succesfully commited
function saveEmp(){
  //your save code
  $('#yourDatagridId').datagrid('reload');
}


My Fren aswzen,

i have to tried to reload this datagrid after edit the data..n success in first datagrid..but datagrid in tab with different browser or datarid in different browser cannot be change...
or maybe my explanation is somewhat less so in this case..he2


so actually i opened two datagrid in the same time, but i opened with different browser..ok
Second step, i edited the data in first datagrid..edit success..and datagrid reload..( note : second datagrid cannot reload because second datagrid in different browser,,you can try if you opened google.com in two browser then you reload page in the first browser..certainly the browser that both are not automatically reload,,nah
well that's what I mean)

Okey. no problem..
but I would like when it opens in the second DataGrid with the same id key but with different browser..in the second datagrid data not update but when I click the edit button, a dialog box that contains the most updated data

   function saveEmp(){
         $('#fmad').form('submit',{
            url: url,
            onSubmit: function(){
               return $(this).form('validate');
            },
            success: function(result){
               var result = eval('('+result+')');
               if (result.success){
                  $.messager.show({   // show error message
                           title: 'Success',
                              //msg: result.errorMsg
                           msg: result.success
                        });
                  $('#dlgad').dialog('close');      // close the dialog
                  $('#result').datagrid('reload');   // reload the user data
               } else {
                  $.messager.show({
                     title: 'Error',
                     msg: result.msg
                  });
               }
            }
         });
      }
3  General Category / EasyUI for jQuery / Re: last update data in datagrid edit dialog box (NOT SOLVED) on: February 11, 2016, 08:47:04 PM
i try to nimbrung too

try to console.log($("#result").datagrid('getRows')); in javascript console after updating data

and then see your javascript console in browser..and then find the row..check if it already updated or not..if not updated that mean your update code is failing/error

my fren aswzen,,
after updating the data in first datagrid, the results of the update can be seen in the first datarid...but if i see the second datagrid in different tab browser, data cannot be change with last updated..but if i reload the second datagrid...the data has been change with last updated...nah...
I'd like is I do not need to click the reload button to see the data changes. when I click the edit button then the edit form will appear that displays the most updated data, the data in the second DataGrid does not update not a problem.


Thank you with your answer and help me...ha ha ha
4  General Category / EasyUI for jQuery / Re: Show many window after click different menu (NOT SOLVED) on: February 11, 2016, 08:29:39 PM
You just follow this to create a window
http://www.jeasyui.com/tutorial/win/win1.php

If you want to load ajax content in windows

Code:
<a href="javascript:void(0)" onclick="$('#w').window('open')">><?=$hasilresult['DisplayNamea'];?></a>

<div id="w" href="<?php echo base_url()?>index.php/<?=$hasilresult['linka'];?>?menunameid=<?=$hasilresult['MenuName_IDa'];?>"  class="easyui-window" title="Modal Window" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:500px;height:200px;padding:10px;">
        The window content.
    </div>

thank you my fren...i will try it..
5  General Category / EasyUI for jQuery / Show many window after click different menu (NOT SOLVED) on: February 09, 2016, 08:08:43 PM
Hi Friends,

I'm nubie in programming..

i have a menu,
I want after the click menu appears window,and when I click on a different menu appears several window.
That is my first problem

The second problem,,i want see a different page in the window...example i click customer menu so i see customer.php, if i click supplier menu so i see supplier.php..but i see all in one page

This is my script

<li>
<a href="<?php echo base_url()?>index.php/<?=$hasilresult['linka'];?>?menunameid=<?=$hasilresult['MenuName_IDa'];?>"  onclick="$('#w').window('open')">><?=$hasilresult['DisplayNamea'];?></a>

                  </li>

This is div for view the result
<div id="w" class="easyui-window" title="Modal Window" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:500px;height:200px;padding:10px;">
        The window content.
    </div>


Nah...well, if that way of course when I click the link it will reload the page to lain..ha ha ha ... how so when I click a link that page that I want to get into the window?

Thank you


 
6  General Category / EasyUI for jQuery / Re: last update data in datagrid edit dialog box on: February 09, 2016, 07:49:48 PM
How do you edit and update a row? Please show an example to demonstrate your issue.

1. First i open 2 datagrid with different tab browser
datagrid scipt :
$(function() {
  var datanya = <?php echo json_encode($_POST); ?>;
  var type = '<?=$TANDA; ?>';
    $("#result").datagrid({
        //url : $.post('<?= site_url() ?>/tiket/searchResult/',datanya,'success'),
      url : '<?= site_url() ?>/masterp/searchResult/type/'+type,
       
        method : 'POST',
        queryParams: datanya,
        columns:[[
            {field:'KD_Cust',title:'KD_Cust',sortable:true},
            {field:'Nama_Cust',title:'Nama_Cust',sortable:true},
            {field:'Alamat',title:'Alamat',sortable:true},
            {field:'Telp',title:'Telp',sortable:true},
          {field:'CP',title:'CP',sortable:true},
            {field:'Nama_CustType',title:'Cust Type',sortable:true},

         
         {field:'IsAktif',title:'IsAktif',sortable:true,formatter:formatPrice}
         
        ]],
        toolbar:"#toolbard",
        pagination:"true",
        nowrap: "false",
        pageSize: 10,
        fitcolumns: "true",
        rownumbers: "false",
   width: "auto",
      height: "300",
   singleSelect: "true"
     
    })
});
2. Then i edited the data from first datagrid, example  before name field is AAAA, after edit is AAAABBBB
script edit
 function EDITDatas(){
         var row = $('#result').datagrid('getSelected');
         if (row){
            $('#dlgad').dialog('open').dialog('setTitle','Edit Data Employee');
            row.menumm="<?=$menunameid;?>";
            $('#fmad').form('load',row);
            url = '<?=site_url() ?>/masterp/editocustomerr/ID/'+row.Cust_ID;
         }
      }

script edit form
 <div id="dlgad" class="easyui-dialog" style="width:380px;height:auto;padding:10px 20px"
         closed="true" buttons="#dlgad-buttons" data-options="modal:true,iconCls:'icon-save',resizable:true,closable:false  ">
      <div class="ftitle">Data Customer</div>
      <form id="fmad" method="post" action="<?=site_url() ?>/masterp/editocustomerr/"  novalidate>

          <div class="fitem">
                <label>Kode_Cust</label>
                <input name="KD_Cust" id="KD_Cust"  style="width:200px;"  class="easyui-validatebox" required="true">

      
            </div>
         <div class="fitem">
                <label>Nama</label>
                <input name="Nama_Cust" id="Nama_Cust"  style="width:200px;" class="easyui-validatebox" required="true">
            <input name="menumm" id="menumm" type="hidden" value="<?=$menunameid;?>"/>
            
            
            </div>
      
         <div class="fitem">
                <label>Alamat</label>
                <input name="Alamat" id="Alamat"  style="width:200px;">
            </div>
         <div class="fitem">
                <label>phone</label>
                <input name="Telp" id="Telp"  style="width:200px;">
            </div>
         <div class="fitem">
                <label>CP</label>
                <input name="CP" id="CP"  style="width:200px;" >
            </div>
         
   <label id="resultzen"> 
         <div class="fitem">
                <label>Customer Type</label>
       
            <select name="m_CustType_ID" id="m_CustType_ID"  class="easyui-combobox" required="true"   >
                                                <?
foreach ($custipe as $resulejs) {
?>
         <option value="<?= $resulejs['CustType_ID']; ?>"><?= $resulejs['KD_CustType']; ?> -- <?= $resulejs['Nama_CustType']; ?></option>
         <?php
}
?>
       </select>    
         
            </div>
         </label>
         <div class="fitem">
                <label>IsAktif</label>
                <input type="checkbox" value="1" name="IsAktif" id="IsAktif" >
            </div>
      
      
      </form>
   </div>
   <div id="dlgad-buttons">
   <a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveEmp()">Save</a>
      <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="
      $.messager.confirm('Confirm', 'Closed Without Saved?', function(r){
   if (r){
      javascript:$('#dlgad').dialog('close')
   }
});
      ">Close</a>
      <a href="#" class="easyui-linkbutton" iconCls="icon-undo" onclick="refreshdif()">Reload</a>
   </div>

3. I saved the data, then i want see the data from second datagrid with the same id key..but in the second datagrid the data not update, the value data in name field still AAAA, not AAAABBBB

Thank you
7  General Category / EasyUI for jQuery / Re: last update data in datagrid edit dialog box on: February 09, 2016, 07:36:29 PM
How do you edit and update a row? Please show an example to demonstrate your issue.

ok friend wait....i will capture my problem
8  General Category / EasyUI for jQuery / Re: last update data in datagrid edit dialog box on: February 09, 2016, 07:35:15 PM
help me all
9  General Category / EasyUI for jQuery / last update data in datagrid edit dialog box (NOT SOLVED) on: February 09, 2016, 08:16:23 AM
dear all,
i opened 2 datagrid with different tab browser..i edited data in first datagrid...then i want to view the data in second datagrid with the same id key..but data cannot be change with last updated...how to keep data can be view with the last update..thank you
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!