Y
yeti349
Hi, I'm using the following code to retrieve data from an xml file and
populate a javascript array. The data is then displayed in html table
form. I would like to then be able to sort by each column. Once the
array elements are split, what is the best way to sort them? Thank you.
//populate data object with data from xml file.
//Data is a comma delimited list of values
var jsData = new Array();
jsData[0] = {lib: "#field SUBLOOKUP_LIB#",doc: "#field SUBLOOKUP_DOC#",
com: "#field SUBLOOKUP_COM"};
//split up values for each element
var o = jsData[0];
o.lib = o.lib.split(",");
o.doc = o.doc.split(",");
o.com = o.com.split(",");
populate a javascript array. The data is then displayed in html table
form. I would like to then be able to sort by each column. Once the
array elements are split, what is the best way to sort them? Thank you.
//populate data object with data from xml file.
//Data is a comma delimited list of values
var jsData = new Array();
jsData[0] = {lib: "#field SUBLOOKUP_LIB#",doc: "#field SUBLOOKUP_DOC#",
com: "#field SUBLOOKUP_COM"};
//split up values for each element
var o = jsData[0];
o.lib = o.lib.split(",");
o.doc = o.doc.split(",");
o.com = o.com.split(",");