this code works…
if(this.dataFile){
var output_list= [];
var counter=this.config.counter || 11
// setup regex, no i no g (only once, and case sensitive)
var splitRegExp = /.*[S][(0-9)]+[E][(0-9)]+/;
// loop thru the list of filenames
for(filename of this.dataFile) {
// if the name is not zero length (split could have returned for just linefeed
if(filename.length >0 && counter>0) {
// get the filename prefix
var split = splitRegExp.exec(filename);
// save name to the output list, as a table entry
// table has a row,
output_list.push("<tr><td>")
// with data
output_list.push(split)
// end of data and row
output_list.push("</td></tr>")
counter--;
}
}
// insert the table into the wrapper
wrapper.innerHTML = "<table>" + output_list.join('')+ "</table>";
} else {
this code doesnt…
var output_list= [];
var counter=this.config.counter || 11
// setup regex, no i no g (only once, and case sensitive)
var splitRegExp = /.*[S][(0-9)]+[E][(0-9)]+/;
// loop thru the list of filenames
for(filename of this.dataFile) {
// if the name is not zero length (split could have returned for just linefeed
if(filename.length >0 && counter>0) {
// get the filename prefix
var split = splitRegExp.exec(filename);
// save name to the output list, as a table entry
// table has a row,
output_list.push("<tr><td>")
// with data
if(split.length >0 )
output_list.push(split)
else
output_list.push('name not found:'+ filename)
// end of data and row
output_list.push("</td></tr>")
counter--;
}
}
// insert the table into the wrapper
wrapper.innerHTML = "<table>" + output_list.join('')+ "</table>";
} else {
wrapper.innerHTML = "No Data";
}
Richie :)