AjaxCRUD.com » ajaxCRUD API

3
ajaxCRUD.com » a PHP class to create / read / update / delete from a database table using AJAX by loud canvas media Home Documentation License Examples Download SUPPORT Contact Us AjaxCRUD API Reference Object: ajaxCRUD CONSTRUCTOR Name Requires Returns Default Short description Example ajaxCRUD object constructor for instantiating the class (String buttonText, String dbTableName, String dbPrimaryKey) More... Example FUNCTIONS Name Requires Returns Default Short description Example addAjaxFilterBox void adds a search box at the top of the page More... Example addAjaxFilterBoxAllFields all fields searchable adds searchboxs for all fields in your table More... Example addButton void adds a button to the bottom of the page More... Example addButtonToRow void no button adds a button to every row and sends the id (pk) of that item to any url 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 appendUploadFilename setFileUpload no value appended append the value of the row to the beginning of the filename More... Example defineAllowableValues void define "allowable" values for a field. More... Example AjaxCRUD.com » ajaxCRUD API - Use PHP & AJAX to CRUD from ... http://www.ajaxcrud.com/api/ 1 de 3 10/03/2011 03:38 p.m.

Transcript of AjaxCRUD.com » ajaxCRUD API

Page 1: AjaxCRUD.com » ajaxCRUD API

ajaxCRUD.com

» a PHP class to create / read / update / delete from adatabase table using AJAX

by loud canvas media

HomeDocumentationLicenseExamplesDownloadSUPPORTContact Us

AjaxCRUD API Reference

Object: ajaxCRUD

CONSTRUCTOR

Name Requires Returns Default Short description Example

ajaxCRUD object constructor for instantiating theclass(String buttonText, StringdbTableName, StringdbPrimaryKey) More...

Example

FUNCTIONS

Name Requires Returns Default Short description Example

addAjaxFilterBox void adds a search box at the topof the page More...

Example

addAjaxFilterBoxAllFields all fieldssearchable

adds searchboxs for all fieldsin your table More...

Example

addButton void adds a button to the bottom ofthe page More...

Example

addButtonToRow void no button adds a button to every rowand sends the id (pk) of thatitem to any url More...

Example

addOrderBy void orders the table by a specifiedfield More...

Example

addTableBorder void off adds a border to the html tablethis function isdeprecicated! -- please usesetCSSFile to controlstyle/layoutMore...

Example

addValueOnInsert void sets a value to a field on rowinsert More...

Example

addWhereClause void null adds an sql "where clause" tothe query More...

Example

appendUploadFilename setFileUpload no valueappended

append the value of the row tothe beginning of the filenameMore...

Example

defineAllowableValues void define "allowable" values for afield. More...

Example

AjaxCRUD.com » ajaxCRUD API - Use PHP & AJAX to CRUD from ... http://www.ajaxcrud.com/api/

1 de 3 10/03/2011 03:38 p.m.

Page 2: AjaxCRUD.com » ajaxCRUD API

defineCheckbox void 1,0 Sets the field to be of type'checkbox'. More...

Example

defineRelationship void defines a relationship betweenyour table and another (via theforeign key) More...

Example

disallowAdd void disallow new rows to beadded to the table More...

Example

disallowDelete void disallows row deletionMore...

Example

disallowEdit void disallows a field to be editedMore...

Example

displayAs void actual fieldname

displays the a field name in thetable under a psudoname.More...

Example

formatFieldWithFunction formatted data non-formateddata

format data in a column with acustom function More...

Example

omitAddField void omits the input field fromdisplaying when adding a rowMore...

Example

omitField void omits a field from displaying inthe table More...

Example

omitFieldCompletely field not omited this function calls bothomitField andomitAddField for a fieldMore...

Example

omitPrimaryKey void omits the primary key fromdisplaying in the table More...

Example

onAddExecuteCallBackFunction (callback function) void calls a local function when anew row is added More...

Example

onDeleteFileExecuteCallBackFunction setFileUpload, (callback function) void calls a local function when afile (that was previouslyuploaded) is deleted More...

Example

onFileUploadExecuteCallBackFunction setFileUpload, your callbackfunction

void calls a local function when afile is uploaded More...

Example

setAjaxFilterBoxSize addAjaxFilterBox oraddAjaxFilterBoxAllFields

10 sets the size (lengh of thetextbox) of an ajax filter boxMore...

Example

setCSSFile void default.css Sets a css file as the stylesheetto be used to render the table.More...

Example

setFileUpload web-safe filenameof uploaded file(on upload

allows a field to accept fileuploads More...

Example

setLimit void 50 set the limit of number of rowsto display More...

Example

setTextareaHeight void input box Sets the textarea height for afield More...

Example

showCheckboxAll void Set ALL checkboxes for afield (in a column) to be on ofoff. More...

Example

showTable ajaxCRUD (the constructor) void (displays thetable)

function to "run" the script /display the table More...

Example

turnOffAjaxADD void (ajax used foradding a row)

Turns off ajax for theCREATE crud operation(adding a row). More...

Example

turnOffAjaxEditing void turns off the ability to edit ALLfields. More...

Example

turnOffPaging paging at50/page

turn off paging so total rowsreturns maxes at a valueMore...

Example

VARIABLES

Name Requires Type Default Short description Example

AjaxCRUD.com » ajaxCRUD API - Use PHP & AJAX to CRUD from ... http://www.ajaxcrud.com/api/

2 de 3 10/03/2011 03:38 p.m.

Page 3: AjaxCRUD.com » ajaxCRUD API

cellspacing variable 0 cellspacing for the html tablethat displays the databasetable

Example

css variable true set to false if you don't want touse a css stylesheet More...

emptyTableMessage variable The message that appearswhen a table is empty.

Example

hover_color variable #B1CFF5 (alight blue)

color when you hover over acell to change its valueMore...

Example

showCheckbox variable false puts a checkbox in front ofeach row More...

Example

New

"Thanks for the great script, you rock big time."~Daniel

© Copyright 2011 Loud Canvas Media. | AjaxCRUD is a free, open-source PHP APIfor non-commercial use.

AjaxCRUD.com » ajaxCRUD API - Use PHP & AJAX to CRUD from ... http://www.ajaxcrud.com/api/

3 de 3 10/03/2011 03:38 p.m.