Editing table information
Editing table information
Hi! First I just want to say that this has been a great tool so far but I have ran into a little situation...
I want to be able to edit table data directly from the table to my server.
The goal is for users to be able to select rows (currently using the "sRowSelect":"multi") and edit the information in those fields.
To clarify, the process would be:
1. User selects rows he/she would like to edit
2. User click's my "Edit" button
[code]
Edit
[/code]
3. The button asks the user to confirm that the fields he chose are correct
[code]
var sData = this.fnGetTableData(oConfig);
function editingconfirmation()
{
var x = confirm("Are you sure you want to edit these fields:\n " + sData + "?");
if (x==true)
{
//Redirect to editor.php
window.location = "/editor.php"
}
}
[/code]
4. The user would be redirected to an editor which would change the database entries.
Unfortunately, the confirmation box does not show the rows the user selected.
Current table script:
[code]
$(document).ready(function() {
oTableLocal = $('#csatable').dataTable( {
"bStateSave": true,
"sPaginationType": "two_button",
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/data-tables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"sRowSelect": "multi",
"aButtons": ["xls", "select_all", "select_none"]
}
} );
} );
[/code]
Is there anyway for the table to send the rows selected to a variable of any sort for use outside of the DataTables?
I want to be able to edit table data directly from the table to my server.
The goal is for users to be able to select rows (currently using the "sRowSelect":"multi") and edit the information in those fields.
To clarify, the process would be:
1. User selects rows he/she would like to edit
2. User click's my "Edit" button
[code]
Edit
[/code]
3. The button asks the user to confirm that the fields he chose are correct
[code]
var sData = this.fnGetTableData(oConfig);
function editingconfirmation()
{
var x = confirm("Are you sure you want to edit these fields:\n " + sData + "?");
if (x==true)
{
//Redirect to editor.php
window.location = "/editor.php"
}
}
[/code]
4. The user would be redirected to an editor which would change the database entries.
Unfortunately, the confirmation box does not show the rows the user selected.
Current table script:
[code]
$(document).ready(function() {
oTableLocal = $('#csatable').dataTable( {
"bStateSave": true,
"sPaginationType": "two_button",
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/data-tables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"sRowSelect": "multi",
"aButtons": ["xls", "select_all", "select_none"]
}
} );
} );
[/code]
Is there anyway for the table to send the rows selected to a variable of any sort for use outside of the DataTables?
This discussion has been closed.