ajaxUrl

Url to submit the Ajax form submission to. Deprecated - use ajax.
Please note - this property requires the Editor extension for DataTables.

Deprecated!

As of v1.3 this feature has been deprecated. This feature has not yet been scheduled for removal, but its use is discouraged and the alternatives discussed below should be used.

As of Editor 1.3 this parameter has been superseded by the ajax option. ajax offers a simpiler and more streamlined option, operating in the same manner as DataTables' own ajax option.

Editor 1.3 does still support this parameter in the same way as Editor 1.2 and earlier for backwards compatibility, but it is recommended you use the newer method suggested above particularly in new scripts.

Description

The URL, or collection of URLs when using a REST interface, which will accept the data for the create, edit and remove functions. The target script / program must accept data in the format defined by Editor and return the expected JSON as required by Editor.

When given as an object, the create, edit and remove properties should be defined, each being the URL to send the data to for that action. When used as an object, the string _id_ will be replaced for the edit and remove actions, allowing a URL to be dynamically created for those actions.

Type

This option can be given in the following type(s):

Examples

Deprecated ajaxUrl option as a string:

var editor = new DataTable.Editor({
	ajaxUrl: 'php/staff.php',
	table: '#myTable'
});

Deprecated ajaxUrl option as an object:

var editor = new DataTable.Editor({
	ajaxUrl: {
		create: '/rest/user/create',
		edit: '/rest/user/_id_/edit',
		remove: '/rest/user/_id_/delete'
	},
	table: '#example'
});

Deprecated ajaxUrl option as an object with different HTTP verbs for each action:

var editor = new DataTable.Editor({
	ajaxUrl: {
		create: 'POST /rest/user/create',
		edit: 'PUT /rest/user/_id_/edit',
		remove: 'DELETE /rest/user/delete'
	},
	table: '#example'
});