Flexible in place editing of TableSorter


« Back to main page

This example demonstrates the restoreRow() function. This is useful if your AJAX update failed and the values (in table) should be restored to the original. NOTE: every other request will fail.

$.tableEditor.lib.restoreRow(o.row,o.original); is used within the update function to restore the row

\n"; for ($col=0; $col < count($line); $col++) { echo "\t\t\t\n"; } echo "\t\t\n"; } fclose($handle); ?>
ID First Name Last Name Phone City Email
233 XXX
"; echo ($col == 0) ? ''.$line[$col].' ' : $line[$col]; echo "


<script type="text/javascript">
$().ready(function() {	
		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
		EDIT_HTML: 'edit',
		SAVE_HTML: 'save',
		EVENT_LINK_SELECTOR: 'button.eventLink',
		FUNC_UPDATE: 'updateTable'
	document.counter = 0;

function updateTable(o) {
	if ((document.counter%2) == 0) {
		// restore row
		alert('Update failed. Row restore.');
		alert('Update Success');
	return true;

(c) 2006 - Brice Burgess