EasyUI Forum
May 16, 2024, 06:47:20 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 / General Discussion / no data on dialog box when user update data on: July 27, 2014, 07:19:29 PM
hi guys,

I'm getting frustrated about my work, on my local computer it's working fine but when I decided to put it in the live server this what happens

Quote
when I click update button a dialog box opens but no value is selected all input fields is empty here is my dialog and js code



Code:
                

function editUser(){
            
            var row = $('#dg').datagrid('getSelected');
            if (row){
                
                //mdid = row.system_md_id;
                
                
                /*$('#dg2').datagrid({
                  url:'get-clinic.html?clinid='+row.system_md_id
                });
                
                $('#dg2').datagrid('reload', {
                  clinid:row.system_md_id
                });*/
                
                $('#dlg').dialog('open').dialog({
                    title: 'Edit Vet',
                    width: 1344,
                    height: 635,
                    closed: false,
                    cache: false,
                    modal: true,
                    resizable: true
                });
                
                $('#fm').form('load',row);
                
                url = 'update-vet.html?id='+row.system_md_id;
}
2  General Category / General Discussion / from local to live server on: July 25, 2014, 12:53:01 AM
hi guys,

Is there anyone experience working in local server(xampp) with jQuery EasyUI then when upload to live server it won't work.
I am working with jQuery EasyUI a week ago but when I decided to put my work online its a mess I am following these tutorial
http://www.jeasyui.com/tutorial/app/crud.php, Is there anyone who can help me?  Huh Huh Huh

thanks
3  General Category / General Discussion / Re: clear all on: July 24, 2014, 10:07:44 PM
thanks for this jarry I appreciate it Cheesy
4  General Category / General Discussion / clear all on: July 23, 2014, 11:14:16 PM
hi guys,

how can I clear all the value when I click the add new row in datagrid every values in form and clear datagrid also?
Am having a trouble clearing the rows in datagrid here is my code

Code:
function newUser(){
           
            $('#dlg').dialog('open').dialog({
                title: 'New Vet',
                width: 1344,
                height: 635,
                closed: false,
                cache: false,
                modal: true,
                resizable: true
            });
           
            $('#fm').form('clear');
            $('#dg2').datagrid('reload');
           
            url1 = 'save-vet.html';
}

thank you very much
5  General Category / General Discussion / unselect row when cancel on: July 23, 2014, 10:28:42 PM
hi guys

how can I unselect row when user click cancel? or after saving

thanks
6  General Category / General Discussion / datagrid functions on: July 23, 2014, 06:49:35 PM
hi guys,

I just wanna ask a question

I have 6 function, add/edit/save for user and add/edit/save for clinic here's the code

Quote
for users

Code:
function newUser(){
            $('#dlg').dialog('open').dialog({
                    title: 'New Vet',
                    width: 1344,
                    height: 635,
                    closed: false,
                    cache: false,
                    modal: true,
                    resizable: true
                });
           
            $('#fm').form('clear');
           
            url1 = 'save-vet.html';
//........

function editUser(){
            var row = $('#dg').datagrid('getSelected');
            if (row){
               
                $('#dg2').datagrid({
                    url:'get-clinic.html?clinid='+row.system_md_id
                });
               
                $('#dlg').dialog('open').dialog({
                    title: 'Edit Vet',
                    width: 1344,
                    height: 635,
                    closed: false,
                    cache: false,
                    modal: true,
                    resizable: true
                });
               
                $('#fm').form('load',row);
               
                url1 = 'update-vet.html?id='+row.system_md_id;
//........


function saveUser(){
           
            $('#fm').form('submit',{
                url: url1,
                onSubmit: function(){
                    return $(this).form('validate');
                },
                success: function(result){
                    var result = eval('('+result+')');
                    if (result.errorMsg){
                        $.messager.show({
                            title: 'Error',
                            msg: result.errorMsg
                        });
                    } else {
                        $('#dlg').dialog('close');        // close the dialog
                        $('#dg').datagrid('reload');    // reload the user data
                        $('#dg').datagrid('reload');    // reload the user data
                    }
                   
                }
            });
        }


Quote
for clinic

Code:
function newclinic(){
            $('#clinimain').dialog('open').dialog({
                    title: 'Add Clinic',
                    width: 500,
                    height: 500,
                    closed: false,
                    cache: false,
                    modal: true,
                    resizable: true,
                    closable: false
            });
           
            $('.clearinfo').val("");
           
            url2 = 'save-clinic.html';
        }
       
        function editclinic(id){
            var row = $('#dg2').datagrid('getSelected');
            if (row){
            $('#clinimain').dialog('open').dialog({
                    title: 'Edit Clinic',
                    width: 500,
                    height: 500,
                    closed: false,
                    cache: false,
                    modal: true,
                    resizable: true,
                    closable: false
            });

            $('#fm2').form('load',row);
               
            url2 = 'update-clinic.html?id='+row.system_company_clinic_id;
           
            }else{
                alert("Please Select A Record To Modify!");
            }
        }

function saveClinic(){
           
            $('#fm2').form('submit',{
                url: url2,
                onSubmit: function(){
                    return $(this).form('validate');
                },
                success: function(result){
                    var result = eval('('+result+')');
                    if (result.errorMsg){
                        $.messager.show({
                            title: 'Error',
                            msg: result.errorMsg
                        });
                    } else {
                        $('#clinimain').dialog('close');        // close the dialog
                        $('#dg2').datagrid('reload');    // reload the user data
                        $('#dg2').datagrid('reload');    // reload the user data
                    }
                   
                }
            });
        }

Quote
My question is I change variable url in add/edit for each account into url1 for user and url2 for clinics , is it safe to change these variable?

thank you very much!
7  General Category / General Discussion / calendar with time on: July 22, 2014, 02:10:34 AM
hi guys,

is it possible to incorporate time to calendar? if yes please guide me on how to do it.

thanks  Grin Grin Grin
8  General Category / General Discussion / Re: pass id from datagrid to datagrid under dialog box on: July 21, 2014, 01:33:01 AM
hi guys,

for the sake of others here's what I've done

Code:
<table id="dg2" class="easyui-datagrid" style="width:auto;max-width:1300px;height:auto" rownumbers="true" fitColumns="true" singleSelect="true" autoRowHeight="false">
                        <thead>
                            <tr>
                                <th field="company_clinic_name" width="30" sortable="true">Clinic Name</th>
                                <th field="Municipality" width="50" sortable="true">Municipality</th>
                                <th field="Province" width="50" sortable="true">Province</th>
                            </tr>
                        </thead>
                    </table>

Code:
var row = $('#dg').datagrid('getSelected');
            if (row){
                
                $('#dg2').datagrid({
                    url:'get-clinic.html?clinid='+row.system_md_id
                });
}

Quote
noted! this data grid is inside a edit dialog box my reference is in my first comment

Quote
Thank you stworthy!!
9  General Category / General Discussion / Re: pass id from datagrid to datagrid under dialog box on: July 21, 2014, 12:14:40 AM
thank you very much stworthy for your reply very much appreciated I will try the code and comeback for the outcome
10  General Category / General Discussion / pass id from datagrid to datagrid under dialog box on: July 20, 2014, 06:22:46 PM
hi guys,

how can i pass the id of the select row in datagrid to another datagrid under/inside the edit dialog box?
here is my reference : http://www.jeasyui.com/tutorial/app/crud.php

thanks Grin Grin Grin
11  General Category / General Discussion / Re: create validation when check box is check on: July 15, 2014, 01:21:44 AM
thank you very much for your reply  Grin
12  General Category / General Discussion / create validation when check box is check on: July 13, 2014, 11:37:34 PM
hi guys,

is it possible to create a validation on validatebox when check box is checked?if yes how?

thanks
13  General Category / General Discussion / datebox if empty set value on: July 13, 2014, 10:15:20 PM
hi guys,


is it possible to set a default value for datebox when date field in database is empty or equal t0 0000-00-00?


thanks
14  General Category / General Discussion / is there a validation for checkbox or radio buttons? on: July 13, 2014, 08:00:34 PM
hi guys,


I just wanna ask if there's a validation code or something like validatebox for radio and check box?


thanks,
15  General Category / General Discussion / Re: how to set two validation in a datebox on: July 10, 2014, 07:50:19 PM
thank you very much stworthy that did the trick  Grin Grin Grin Grin
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!