NEED FOR A FULL jeditable PHP MYSQL example
NEED FOR A FULL jeditable PHP MYSQL example
This project is wonderful and needs to be spred amongst the interwebs.
I would like to use this table and jeditable in my small website. I cannot find a definitive example of how to code jeditable with PHP and MYSQL. I am a beginning javascripter and the examples I find are quite confusing including the one on the download pack and on the website FAQ's.
Can someone help.
Here is what I have so far and this works(interface not the PHP/MYSQL part) as of right now.
http://69.175.21.50/~stbriga1/app/admin/em.php
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Permissions and Editing Users
@import "../inc/datatables/media/css/demo_page.css";
@import "../inc/datatables/media/css/demo_table.css";
@import "../inc/datatables/media/css/TableTools.css";
$(document).ready( function () {
/* You might need to set the sSwfPath! Something like:*/
TableToolsInit.sSwfPath = "../inc/datatables/media/swf/ZeroClipboard.swf";
var oTable = $('#example').dataTable( {
"sPaginationType": "full_numbers",
"sDom": 'T<"clear">lfrtip'
} );;
/* Apply the jEditable handlers to the table */
$('td', oTable.fnGetNodes()).editable( '../inc/datatables/examples/examples_support/editable_ajax.php', {
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return { "row_id": this.parentNode.getAttribute('id') };
},
"height": "14px"
} );
} );
var opts = {
dateFormat: 'yy-mm-dd',
gotoCurrent: true,
};
$(function() {
$('#date').datepicker(opts);
});
APP Home
<!-- Admin -->
Finance
Members
<!-- End Header -->
Permissions and Editing Users
First
Last
Members
Financing
Douglas
McDonald
Edit
1
1
David
Golferty
Edit
1
1
0 = disabled
1 = enabled
[/code]
Also I am having trouble with how to not make a column editable for my links. Can check boxes become editable as well?
Beginning javascripter explanations please.
I would like to use this table and jeditable in my small website. I cannot find a definitive example of how to code jeditable with PHP and MYSQL. I am a beginning javascripter and the examples I find are quite confusing including the one on the download pack and on the website FAQ's.
Can someone help.
Here is what I have so far and this works(interface not the PHP/MYSQL part) as of right now.
http://69.175.21.50/~stbriga1/app/admin/em.php
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Permissions and Editing Users
@import "../inc/datatables/media/css/demo_page.css";
@import "../inc/datatables/media/css/demo_table.css";
@import "../inc/datatables/media/css/TableTools.css";
$(document).ready( function () {
/* You might need to set the sSwfPath! Something like:*/
TableToolsInit.sSwfPath = "../inc/datatables/media/swf/ZeroClipboard.swf";
var oTable = $('#example').dataTable( {
"sPaginationType": "full_numbers",
"sDom": 'T<"clear">lfrtip'
} );;
/* Apply the jEditable handlers to the table */
$('td', oTable.fnGetNodes()).editable( '../inc/datatables/examples/examples_support/editable_ajax.php', {
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return { "row_id": this.parentNode.getAttribute('id') };
},
"height": "14px"
} );
} );
var opts = {
dateFormat: 'yy-mm-dd',
gotoCurrent: true,
};
$(function() {
$('#date').datepicker(opts);
});
APP Home
<!-- Admin -->
Finance
Members
<!-- End Header -->
Permissions and Editing Users
First
Last
Members
Financing
Douglas
McDonald
Edit
1
1
David
Golferty
Edit
1
1
0 = disabled
1 = enabled
[/code]
Also I am having trouble with how to not make a column editable for my links. Can check boxes become editable as well?
Beginning javascripter explanations please.
This discussion has been closed.
Replies
To be selective about your columns, see this thread:
http://datatables.net/forums/comments.php?DiscussionID=529&page=1#Item_3