mdArrayEngine: Javascript Array Class

mdArrayEngine: Javascript Array Class


mdArrayEngine: A free to use Javascript class for multi dimension array creation and manipulation

Download mdArrayEngine

Although this class is not all encompassing by any means, it should assist assist you with any Javascript projects incorporating multi dimensional array use. Should you wish to add or extend the class, please feel free to do so. If you feel that others could benefit from your work, please include a message below and I will include your additions to the base class as appropriate.

How to Instantiate:

1. Include the file md_arr_engine.js in your project.
2. in your javascript, instantiate the array class in the following manner:

    var a = new mdArrayEngine();

List of mdArrayEngine functions:

init(): to initialize the class array
getLength(): to return the length of the array
getRowLength(row = [int]): to return the length of the array’s row
push(v = [mixed var]): push string or array of values onto the end of the array
rowPush(searchValue = [mixed var], addValues = [array]): Add array items to an existing row where the searchValue matches
indexOfValue(v = [mixed value]): to return the array indices of the value in the array
getValue(iRow=[int], iCol=[int]): To return a value from the array matching the supplied row and column numbers.
setValue(iRow = [int],iCol = [int], data = [mixed var]): To assign a value to the array matching the supplied row and column numbers.
getRow(iRow=[int]): To return a row from the array matching the supplied row number
getAllValues(): To return the entire contents of the array as an array.
updateItem(searchVal = [mixed var], replaceVal = [mixed var]): To enable a singular search and replace in the array
upadteRow(searchVal = [mixed var], replaceVal = [mixed var]): To enable a row replace in the array based on the searchVal parameter.
deleteRow(row =[int]): Delete the row number corresponding to the row variable.
updateRow_DualCondition(condition1 = [mixed var], condition1 = [mixed var], updateData = [array]): updates differences in matching row with data from updateData or inserts a new row if no match found on search condition1 & condition2 Returns true for success, false for failure
column_Arithmetic_Sum_SingleCondition(conditionalColumn = [int], value = [mixed var], columnToAdd = [int]): To sum the values of the columnToAdd WHERE conditionalColumn = x AND conditionalColumn value = y.
arrayDump(): To display the entire contents of the array as an html table.

Search

Contact Us

Kromosome Industries Pty. Ltd.
A.B.N. 13007002182

Melbourne, Australia
99 Ocean Boulevard
Jan Juc, Victoria
Australia 3228
T: (+613) 5261 5430
F: (+613) 8677 9729

Kromosome Smart Software Solutions

Content Management Systems

Customized CMS

There are many open source content management systems available today, enabling customization to your specific needs. We can assist you navigate your way through the maze of available systems and select the most appropriate system for your application.

read more
Kromosome Smart Software Solutions

e-Commerce Systems

Customized e-Commerce

With an assessment of your current and future expectations of an electronic commerce system we can guide you through the plethora of available options, steer you away from common pitfalls which result in increased long term costs to maintain your system, and deliver a system which will meet your expectations today and into the future.

read more
Kromosome Smart Software Solutions

Technobabble

Our Areas of Expertiese

  • HTML / XHTML
  • CSS
  • Javascript / Ajax / jQuery
  • XML / JSON / JSONP
  • Flash (AS3) / Actionscript
  • PHP
  • SQL Database Development
  • CMS & E-Commerce Systems
  • Automated SMS Systems

read more
Kromosome Smart Software Solutions

© 2010 Kromosome Industries Pty. Ltd. A.B.N. 13 007 002 182