I have a array called 'data' which is used globally as it is being used in other functions. Each data has array of values like
data= "United States,Tennessee,Anderson";
Could some one please help me how put these comma separated values in a table. I was trying this in javascript:
data=new Array();
function display(){
//window.open(_blank,'myWindow');
document.write("<table border='1'>");
for(var i=0;i<data.length;i++)
{
document.write("<tr>");
data[i]=new Array();
for(var j=0;j<data[i].length;j++)
{
document.write("td>"+data[i][j]+"</td>");
}
document.write("</tr>");
}
document.write("</table>");
}