Show Posts
|
Pages: [1] 2
|
1
|
General Category / EasyUI for jQuery / populate input box with php echo
|
on: June 17, 2015, 05:53:34 AM
|
Hi, I've got a form within datagrid that has various input boxes, I want to populate the information in certain ones.
I know this code works under normal html but I cannot get it to work with jquery easy ui datagrid - any suggestions please?
<input name="username" class="easyui-textbox"value="<?php echo $login_session; ?>" style="width:250px;">
|
|
|
2
|
General Category / EasyUI for jQuery / Re: create a copy button on datagrid
|
on: June 16, 2015, 05:27:26 AM
|
You do not paste your saving code but it may look like this. $.ajax({ url:... //... success:function(){ $('#dlg').dialog('close'); } })
Hi again, my saving code is;- function saveDel(){ $('#fm').form('submit',{ url: url, 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 } } }); } but I would have thought it should still close once the save button is clicked? The data gets added to the database ok
|
|
|
3
|
General Category / EasyUI for jQuery / Re: create a copy button on datagrid
|
on: June 16, 2015, 03:21:30 AM
|
Hi stworthy,
thanks but I am struggling to get that method to work. My code currently is;-
function copyDel(){ var row = $('#dg').datagrid('getSelected'); if (row){ $('#dlg').dialog('open').dialog('setTitle','COPY Delivery Note'); $('#fm').form('load',row); url = '/add_del_out.php?id='+row.id; } }
I tried to add your 'close' method at the end but I think this opens the dialog and then immediately closes it. I would have thought that once I clicked save it saved the data to the database and then cleared and closed the dialog.
Any ideas?
|
|
|
4
|
General Category / EasyUI for jQuery / Re: create a copy button on datagrid
|
on: June 15, 2015, 08:34:47 AM
|
UPDATE
I ran this code and it created the copy but the problem is the dialog box didnt close so I clicked the save button 3 times and it created 3 copies - does anyone know how to get it to close the dialog after save is hit and refresh the data?
here's my code;-
function copyDel(){ $('#dlg').dialog('open').dialog('setTitle','Copy Delivery Note'); $('#fm').form('clear'); url = '/functions/add/add_del_out.php'; }
}
|
|
|
5
|
General Category / EasyUI for jQuery / create a copy button on datagrid
|
on: June 15, 2015, 07:50:12 AM
|
Hi,
I'm trying to create a 'copy' button on datagrid so that a user can select a previous entry and then copy it to the database - similar to the edit function. The id is AI so this is the only value that I dont want to copy for obvious reasons, I think this can be done but I havent a clue to get it working.
I've created the copy button ready but need to create the script.
Any help is appreciated!
|
|
|
6
|
General Category / EasyUI for jQuery / how to display error code on
|
on: May 06, 2015, 08:59:32 AM
|
Hi,
All of a sudden my datagrid application no longer accepts new forms however I can edit, I believe I'm trying to track the error down but the standard jquery code just states "some errors occurred". Can anyone tell me how to display the mysql error so I can track the problem?
The existing code is as follows;-
echo json_encode(array('errorMsg'=>' Some errors occured.'));
Thanks
|
|
|
7
|
General Category / EasyUI for jQuery / mkdir on datagrid entry
|
on: April 16, 2015, 01:55:44 AM
|
Hi Everyone,
I'm trying to create a directory when I add an item using the datagrid form, I'm struggling to get it to work - does anyone know how to do this. For instance I have a project form that adds $id, $name & $company to different columns in the database, I wanted these to be the title of the folder for instance "57 Name Company"
I know that it needs to be along the lines of;-
echo json_encode(array( 'id' => mysql_insert_id(), 'name' => $name, 'company' => $company ));
mkdir("/path/to/directory", 0777, true);
} else { echo json_encode(array('errorMsg'=>'Some errors occured.')); } ?>
Thanks
|
|
|
11
|
General Category / EasyUI for jQuery / Re: jquery easyui datagrid row link help
|
on: April 01, 2015, 01:07:35 AM
|
I've managed to be able to load the 'ID' of the selected row using one of the tutorials, here is my code;-
function viewOrder(){ var row = $('#dg').datagrid('getSelected'); if (row){ alert('Item ID:'+row.id); }
I just cannot seem to be able to transfer this row 'ID' to my URL = /include/functions/reports/purchase_order.php?id=
Any ideas anyone???
|
|
|
12
|
General Category / EasyUI for jQuery / Re: jquery easyui datagrid row link help
|
on: March 27, 2015, 09:14:07 AM
|
yes, but they looks the same, so you need to provide more details
Hi again, the second code doesnt work and is what I've tried to modify. When I use the form and click the view button it does nothing. Below is the code I have started but it does not work correctly, I believe it is nearly there;- function viewOrder(){ var row = $('#dg').datagrid('getSelected'); if (row){
$('#fm').form('load',row); url = '/include/functions/reports/purchase_order.php?id='+row.id;
|
|
|
13
|
General Category / EasyUI for jQuery / Re: jquery easyui datagrid row link help
|
on: March 27, 2015, 12:45:33 AM
|
I'm not sure I understand the difference between working and not working. what's the value of url variable after?
Hi Chrwei, the editOrder code is a working script. I've tried to modify this code in order to open the row ID in another URL. Essentially the jquery easyui datagrid displays minimal details and this url is like a report which will display more values from the database. I appreciate your help.
|
|
|
14
|
General Category / EasyUI for jQuery / Re: jquery easyui datagrid row link help
|
on: March 25, 2015, 08:51:12 AM
|
hi, sorry for the confusion.
I've added another button to the header similar to new/edit/delete but I cant establish the link. Basically the user selects a row (similar to edit) and clicks the view button. It then should transfer this ROW ID to an external page located at /include/functions/reports/purchase_order.php?id='ROW ID HERE; which then displays additional information from the database.
thanks
|
|
|
|