function generateTable(srcArray, headers, id){

	var table = document.createElement("TABLE");
	table.id=id;
		var row = table.insertRow(-1);
		var fields = Object.keys(srcArray[0]);
	
		/*generate the header from the header elements list passed*/
		for(var i=0;i<headers.length;i++){
			var header=document.createElement('TH');
			header.innerHTML=headers[i];
			header.className='col-'+i;
			header.setAttribute('class','col-'+i);
			row.appendChild(header);
		}
	
			/*Add the data rows.*/
			for (var i = 0; i < srcArray.length; i++) {
					
					row = table.insertRow(-1);
				
					for(var j=0;j<fields.length;j++){
						var cell = row.insertCell(-1);
						cell.innerHTML = srcArray[i][fields[j]];
						cell.className='col-'+j;
						//cell.setAttribute('class','col-'+j+1);//class for applying style to have specific columns displayed on small devices
					}
			
			}
	
	return table;
			
}
/*Custom function to dynamically generate a HTML Table object from the parameters passed
Returns HTML DOM Table object
Used by lookup.js and savingsBank.js*/
Custom function to dynamically generate a HTML Table object from the parameters passed
Returns HTML DOM Table object
Used by lookup.js and savingsBank.js
Custom function to dynamically generate a HTML Table object from the parameters passed Returns HTML DOM Table object Used by lookup . js and savingsBank . js
function generateTable(srcArray, headers, id){
	var table = document.createElement("TABLE");
	table.id=id;
		var row = table.insertRow(-1);
		var fields = Object.keys(srcArray[0]);
		for(var i=0;i<headers.length;i++){
			var header=document.createElement('TH');
			header.innerHTML=headers[i];
			header.className='col-'+i;
			header.setAttribute('class','col-'+i);
			row.appendChild(header);
		}
			for (var i = 0; i < srcArray.length; i++) {
					row = table.insertRow(-1);
					for(var j=0;j<fields.length;j++){
						var cell = row.insertCell(-1);
						cell.innerHTML = srcArray[i][fields[j]];
						cell.className='col-'+j;
					}
			}
	return table;
}
function generateTable ( srcArray , headers , id ) { var table = document . createElement ( "TABLE" ) ; table . id = id ; var row = table . insertRow ( - 1 ) ; var fields = Object . keys ( srcArray [ 0 ] ) ; for ( var i = 0 ; i < headers . length ; i ++ ) { var header = document . createElement ( 'TH' ) ; header . innerHTML = headers [ i ] ; header . className = 'col-' + i ; header . setAttribute ( 'class' , 'col-' + i ) ; row . appendChild ( header ) ; } for ( var i = 0 ; i < srcArray . length ; i ++ ) { row = table . insertRow ( - 1 ) ; for ( var j = 0 ; j < fields . length ; j ++ ) { var cell = row . insertCell ( - 1 ) ; cell . innerHTML = srcArray [ i ] [ fields [ j ] ] ; cell . className = 'col-' + j ; } } return table ; }
Custom function to dynamically generate a HTML Table object from the parameters passed
Returns HTML DOM Table object
Used by lookup.js and savingsBank.js
Custom function to dynamically generate a HTML Table object from the parameters passed Returns HTML DOM Table object Used by lookup . js and savingsBank . js
/*generate the header from the header elements list passed*/ /*Add the data rows.*/ //cell.setAttribute('class','col-'+j+1);//class for applying style to have specific columns displayed on small devices
