TableEditor

Flexible in place editing of TableSorter


SIMPLE EXAMPLE

« Back to main page

This example simply alerts when each user defined function is called

ID First Name Last Name Phone City Email
233 (edit) XXX
1 (edit) Brice Burgess (800)768-5283 Milwaukee b@b.com
2 (edit) Christian Bach (800)768-6288 Chicago c@c.com
3 (edit) Abe Lincoln (800)223-2331 Washington D.C. l@l.com
8 (edit) Sam Lightning Hopkings (800)728-1221 Houston s@s.com
15 (edit) Rudyard Kipling (512)121-1280 London r@r.com

SOURCE

<script type="text/javascript">
$().ready(function() {	
	$("#editableTable").tableSorter({
		sortColumn: 'First Name',			// Integer or String of the name of the column to sort by.  
		sortClassAsc: 'headerSortUp',		// class name for ascending sorting action to header
		sortClassDesc: 'headerSortDown',	// class name for descending sorting action to header
		headerClass: 'header', 				// class name for headers (th's)
		disableHeader: 'ID' 	// DISABLE Sorting on ID
	}).tableEditor({
		EDIT_HTML: 'EDIT2',
		SAVE_HTML: 'Save',
		FUNC_PRE_EDIT: 'preEdit',
		FUNC_POST_EDIT: 'postEdit',
		FUNC_PRE_SAVE: 'preSave',
		FUNC_UPDATE: 'updateTable'
	});
});

function updateTable(o) {
	alert('FUNC_UPDATE called');
}

function preSave(o) {
	alert('FUNC_PRE_SAVE called');
}

function postEdit(o) {
	alert('FUNC_POST_EDIT called');
}

function preEdit(o) {
	alert('FUNC_PRE_EDIT called');
}
</script>


(c) 2006 - Brice Burgess