<!DOCTYPE html>
<html>
<head>
	<meta charset="ISO-8859-1">
	<title>Demo save via ajaxt</title>
	<style>
		.simple-table{
			font-family: sans-serif;
		    border: 1px solid #cbcbcb;
		    border-collapse: collapse;
		    border-spacing: 0;
		}
		
		.simple-table thead {
		  background-color: #e0e0e0;
		  color: #000;
		}
		
		.simple-table td,
		.simple-table th{
			text-align: center;
			padding: 0.5em 1em;
		}
	</style>
	
	<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
	<link rel="stylesheet" href="../src/jquery.editrowform.css">
	<script src="../src/jquery.editrowform.js"></script>
	
	<script type="text/javascript">
		$(function() {
			$( "#table").editrowform(
				{
					click: true,  // for double clicking/clicking functionality
					onSave: function(even, form, rowIndex, row, rowValues){ 
						var url = "fake-ajax-response.html";
						$.ajax({
							  url: url,
							  method: "POST",
							  data: $(form).serialize(),
							  success: function( data ) { 
								  $( "#table").editrowform( "setRowValues", rowIndex, rowValues ); 
								  $( "#table").editrowform( "hide" ); 
							  },
							  dataType: "json"
						}).fail(function() {
						    alert( "Our save failed" );
						});

						
						// return false to stop the plugin from implicitly
						// calling setRowValues and hide.  We will call it programmatically from our ajax callback
						return false;
					},
					onCancel: function(e, form){
						console.log("I'm cancelling.");
					}
				}		
			);

		});
	</script>	
		
</head>
<body>
	<br/>

	Double click to edit.
	<table id="table" class="simple-table" style="margin-left: 100px;">
		<thead>
			<tr>
				<th>
					h1
				</th>
				<th>
					h2
				</th>
				<th>
					h3 
				</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>
					r1c1
				</td>
				<td>
					r1c2
				</td>
				<td>
					r1c3
				</td>
			</tr>
			<tr>
				<td>
					r2c1
				</td>
				<td>
					r2c2
				</td>
				<td>
					r2c3
				</td>
			</tr>						
		</tbody>
	</table>
</body>
</html>
Add an example to demo saving via ajax.
Add an example to demo saving via ajax.