Sorting An Array of Objects

Example to sort array below using name property: Below will be the methods to sort Asc/ Desc: To call the method:

Querying a stylized list with dynatable

 Example to query a table for a certain value: query from dynamic generated drop down list from the array of objects. var dyna = $j('#serverDetails') .dynatable({ dataset: { records: window.xData, //array of objects perPageDefault: 20 }, features: { paginate: true, sort: true, pushState: false, //must be false if not got error search: false, recordCount: true, …

Continue reading Querying a stylized list with dynatable

How to convert an array of key-value tuples into an object

An array of many sub arrays. Converting each sub array into an object:

Designing Table and Data For Folder Structure To Be Use On User Interface

I need to design a web page where it involve tree structure/ directory structure, each folder / file will be a record. So what will be the best way to query what I needed? Below have a solution which is quite useful.   Requirement will be like this: > categoryA [dir] > hostA [dir] > …

Continue reading Designing Table and Data For Folder Structure To Be Use On User Interface

Distinct an array of objects using JavaScript

I have an array of objects where I wanted make a list of array which is unique while at the same time adding different values to sub property into the distinct object. Example below is an array of a mixture of folders and files, together with it are it details include used size, access users …

Continue reading Distinct an array of objects using JavaScript

Nested Loop From A Folder to Get Files In Servers

Nested loop to do whatever you need to do with the files and folders in the server remotely using ManagementScope. This function will loop the first layer or loop nested until the end. Below example is to generate a html nested list:

How to Use Window.onload() Event

Any DOM manipulation code which depends on the DOM elements located at the head section of the html page, this code will be executed first before the DOM is fully ready. However error may occurs. Therefore, it is required to put the codes inside a callback function which will be fire when the DOM is …

Continue reading How to Use Window.onload() Event