ajaxCRUD.com

» a PHP API to create / read / update / delete from a database table using AJAX

AjaxCRUD API Reference

Object: ajaxCRUD

Constructor

Name Requires Returns Default Short description Example
ajaxCRUD object constructor for instantiating the class More... Example

Functions

Name Requires Returns Default Short description Example
addButton void adds a button to the bottom of the page More... Example
addButtonToRow void adds a button to every row and sends the id of that item to a page More... Example
addOrderBy void orders the table by a specified field More... Example
addTableBorder void off adds a border to the html table
this function is deprecicated! -- please use setCSSFile to control style/layout
More...
Example
addValueOnInsert void sets a value to a field on row insert More... Example
addWhereClause void null adds an sql "where clause" to the query More... Example
defineAllowableValues void define "allowable" values for a field. More... Example
defineCheckbox void 1,0 Sets the field to be of type 'checkbox'. More... Example
defineRelationship void defines a relationship between your table and another (via the foreign key) More... Example
disallowAdd void disallow new rows to be added to the table More... Example
disallowDelete void disallows row deletion More... Example
disallowEdit void disallows a field to be edited More... Example
displayAs void actual field name displays the a field name in the table under a psudoname. More... Example
omitAddField void omits the input field from displaying when adding a row More... Example
omitField void omits a field from displaying in the table More... Example
omitPrimaryKey void omits the primary key from displaying in the table More... Example
onAddExecuteCallBackFunction (callback function) void calls a local function when a new row is added More... Example
onDeleteFileExecuteCallBackFunction setFileUpload, (callback function) void calls a local function when a file (that was previously uploaded) is deleted More... Example
onFileUploadExecuteCallBackFunction setFileUpload, your callback function void calls a local function when a file is uploaded More... Example
setCSSFile void default.css Sets a css file as the stylesheet to be used to render the table. More... Example
setFileUpload web-safe filename of uploaded file (on upload allows a field to accept file uploads More... Example
setLimit void 50 set the limit of number of rows to display More... Example
setTextareaHeight void input box Sets the textarea height for a field More... Example
showTable ajaxCRUD (the constructor) void (displays the table) function to "run" the script / display the table More... Example
turnOffAjaxADD void (ajax used for adding a row) Turns off ajax for the CREATE crud operation (adding a row). More... Example

Variables

Name Requires Type Default Short description Example
cellspacing variable 0 cellspacing for the html table that displays the database table Example
css variable true set to false if you don't want to use a css stylesheet More...
hover_color variable #B1CFF5 (a light blue) color when you hover over a cell to change its value More... Example
New