EasyUI Forum
April 27, 2024, 07:59:18 AM *
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 / General Discussion / Re: Footer row with dynamically updating capabilities on: June 27, 2017, 11:45:41 PM
sir where should be the proper position of this code:

$('#dg').datagrid('reloadFooter', [
  {itemid:'Total Bal',listprice:123},
  {itemid:'Available Bal',listprice:456}
]);
2  General Category / EasyUI for jQuery / parse jason showing undefined error on: February 02, 2017, 02:02:16 AM
here's my code:

      function validateLogIn(){
         var url = 'modules/data/get_loginuser.php';
         alert(url);

         $('#fm_login').form('submit',{
            url: url,
            onSubmit: function(){
               return $(this).form('validate');
            },
            success: function(result){
               if (result.errorMsg){
                  $.messager.show({
                     title: 'Error',
                     msg: result.errorMsg
                  });
               } else {
                  alert(result);
                  //result alert is: [{"user_id":"7818","user_name":"karogel","user_password":"827ccb0eea8a706c4c34a16891f84e7b","user_webpass":"827ccb0eea8a706c4c34a16891f84e7b","lastname":"ramiterre","firstname":"rogel","fullname":"rogel ramiterre","nameinitials":"rramiterre","jobtitle":"programmer","admin":"N","branch_name":"Guimba","active":"Y","online":"N","last_active":null,"dateadded":"2015-07-28 07:51:35","addedbyfk":"1","datemodified":"2015-07-28 09:28:47","lastuserfk":"1","is_sync":"0","datetime_sync":"0000-00-00 00:00:00"}]
                  var vfirstname = (result['0'].firstname);
                  alert(vfirstname);
                  $.messager.alert('System Admin','Welcome');                  
//                  $('#dlg_login').dialog('close');      // close the dialog
//                  redirect to main menu
               }
            }
         });      
3  General Category / General Discussion / User Login Sample on: December 27, 2016, 10:36:48 PM
Sir do you have sample user login sample code using easyui
4  General Category / General Discussion / Re: How to handle onLoadSuccess if form load was used twice on: November 03, 2016, 07:39:10 PM

var url_recom    = 'modules/data/get_loanrecom.php?id='+row.maker_id+'&loanappid='+row.app_loanappid;
$('#fm_application_proposal').form('load',url_recom);

$('#fm_application_proposal').form('load',row);

is the above code OK? i am trying to load the data from "url_recom" and "row" data (from datagrid).

if i will use onLoadSuccess, will it fire after the first form(load ? or after the last form(load or is therea way to comine the 2 data source into single form(load
5  General Category / General Discussion / How to handle onLoadSuccess if form load was used twice on: November 02, 2016, 01:15:03 AM
I have this code:
var flag;
function loanproposalshow(){
   var row = $('#dg_application_ci').datagrid('getSelected');
   if (row){
      // open dialog
      $('#dlg_application_proposal').dialog('open').dialog('setTitle','Loan Proposal');

      $('#fm_application_proposal').form('clear');
            
      var url_recom    = 'modules/data/get_loanrecom.php?id='+row.maker_id+'&loanappid='+row.app_loanappid;
      $('#fm_application_proposal').form('load',url_recom);

      $('#fm_application_proposal').form('load',row);
            
      $(function(){
         $('#fm_application_proposal').form({
            onLoadSuccess:function(){
               flag = true;
               calc_recom_apa();
            }
         });
      });
      url = 'modules/application/update_application.php?loanappid='+row.app_loanappid;
   }
}

I am having a problem in calling calc_recom_apa function. It should initiate after the 2 form load and not from the first "form('load',url_recom)"
6  General Category / EasyUI for jQuery / Is it possible to load multiple url or json to form on: October 27, 2016, 11:58:35 PM
is it possible to load multiple url or json to form like:

$('#form1).form('load',
   url1,
        url2,
       {
          name:'name2',
          email:'mymail@gmail.com',
          subject:'subject2',
          message:'message2',
          language:5
        }
);   
7  General Category / EasyUI for jQuery / Re: Remove textbox Border on: October 23, 2016, 07:44:50 PM
Thank you also. i need the same code
8  General Category / EasyUI for jQuery / how to use Enter key to move focus instead of tab on: August 16, 2016, 08:45:51 AM
How to use Enter Key to move textbox focus instead of tab
9  General Category / EasyUI for jQuery / how to control numberbox what to focus next after pressing enter key on: August 14, 2016, 06:22:42 PM
Hi im trying to control what numberbox to focus after keypress, like this code:

$('#app_charge1').numberbox('textbox').bind('keypress',function(e){
   if(e.keyCode==13)
   {
      $('#app_charge2').numberbox.focus();
   }

});
   
10  General Category / EasyUI for jQuery / Re: How to avoid onchange method to run during the initial loading of form data? on: August 12, 2016, 01:22:03 AM
It's working...problem solved....Thank you very much stworthy
11  General Category / EasyUI for jQuery / Re: How to avoid onchange method to run during the initial loading of form data? on: August 11, 2016, 01:00:54 AM
Sorry no luck! I want to use onchange only after loading the initial form data, here's my code:

<form id="fm_application" method="post" novalidate>
   <div>
      Charge 1: <input name="charge1" id="charge1" class="easyui-numberbox"></input></br>
      Charge 2: <input name="charge2" id="charge2" class="easyui-numberbox"></input></br>
      Charge 3: <input name="charge3" id="charge3" class="easyui-numberbox"></input></br>
      Total <input name="totalcharge" id="totalcharge" class="easyui-numberbox" readonly="true"></input></br>
   </div>
</form>

<script>
      function editdata(){
         var row = $('#dg_application').datagrid('getSelected');
         if (row){
            $('#dlg_application').dialog('open').dialog('setTitle','Edit Application');
            var url_loancharge    = 'modules/data/get_saveloancharge.php?appstatuscode=NewApp&loanappid='+row.app_loanappid;
            $('#fm_application').form('load',row);
            $.post(url_loancharge, function(data){
               var data1 = $.parseJSON(data);//parse JSON
               var vtotalcharge =    parseFloat(data1.app_charge1)+
                              parseFloat(data1.app_charge2)+
                              parseFloat(data1.app_charge3);
               $('#fm_application').form('load', $.extend({},data,{
                  charge1:data1.charge1,
                  charge2:data1.charge2,
                  charge3:data1.charge3,
                  totalcharge:vtotalcharge
               }))
            });
         }
      }
      
      $('#charge1').numberbox({
         onChange: function(){
         calc_totalcharge();
        }
      });      
      $('#charge2').numberbox({
         onChange: function(){
         calc_totalcharge();
        }
      });      
      $('#charge3').numberbox({
         onChange: function(){
         calc_totalcharge();
        }
      });      
      function calc_totalcharge(){
            var vcharge1   = parseFloat($('#charge1').numberbox('getValue')) || 0;
            var vcharge2   = parseFloat($('#charge2').numberbox('getValue')) || 0;
            var vcharge3   = parseFloat($('#charge3').numberbox('getValue')) || 0;
            var vtotalcharge = vcharge1 + vcharge2 + vcharge3;
            $('#totalcharge').numberbox('setValue', vtotalcharge);
      }
      




12  General Category / EasyUI for jQuery / textbox lostfocus or focusout on: August 10, 2016, 09:09:03 PM
Is there a event in textbox like lost focus or focus out
13  General Category / EasyUI for jQuery / How to avoid onchange method to run during the initial loading of form data? on: August 09, 2016, 08:41:02 PM
Hi all!

I'm using onchange to my selected textbox to call the automatic computation. The function does well but I dont want to run the function during the initial loading of form data based on adjusted save records.

Is there a way to avoid onchange to function during the initial form load?
14  General Category / EasyUI for jQuery / Re: datagrid('getData') runs before data is loaded. [Resolved] on: July 28, 2016, 08:02:18 PM
sir how to pass the stringtify data to server
15  General Category / EasyUI for jQuery / Saving into multiple table on: November 01, 2015, 06:02:54 PM
Please help...how to create save.php file with multiple table, say save to personalinfo.php and address.php

I am following or using this simple code for saving to single table:

<?php

$firstname = htmlspecialchars($_REQUEST['firstname']);
$lastname = htmlspecialchars($_REQUEST['lastname']);
$phone = htmlspecialchars($_REQUEST['phone']);
$email = htmlspecialchars($_REQUEST['email']);

include '../conn.php';

$sql = "insert into users(firstname,lastname,phone,email) values('$firstname','$lastname','$phone','$email')";
$result = @mysql_query($sql);
if ($result){
   echo json_encode(array(
      'id' => mysql_insert_id(),
      'firstname' => $firstname,
      'lastname' => $lastname,
      'phone' => $phone,
      'email' => $email
   ));
} else {
   echo json_encode(array('errorMsg'=>'Some errors occured.'));
}
?>
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!