posted 14 years ago
Hi,
Kindly guide me to display table by aligning it while filtering as im filtering row wise its getting collapsed kindly guide me...
function search_value1()
{
var tab=new Array(50);
var row=new Array(150);
var col=new Array(150);
var col1=new Array(150);
var tablelen,rowlen,collen,a,b,c;
var usetemp,usetemp1;
tablelen=document.getElementsByTagName("TABLE").length;
for(a=0;a<tablelen;a++)
{
tab[a]=document.getElementsByTagName("TABLE")[a];
rowlen=tab[a].getElementsByTagName("tr").length;
for(b=1;b<rowlen;b++)
{
row[b]=tab[a].getElementsByTagName("tr")[b];
row[b].style.display='none';
tab[a].style.display='none';
}
}
for(a=0;a<tablelen;a++)
{
tab[a]=document.getElementsByTagName("TABLE")[a];
rowlen=tab[a].getElementsByTagName("tr").length;
for(b=1;b<rowlen;b++)
{
row[0]=tab[a].getElementsByTagName("tr")[0];
row[b]=tab[a].getElementsByTagName("tr")[b];
collen=row[0].getElementsByTagName("th").length;
for(c=0;c<collen;c++)
{
col[c]=row[0].getElementsByTagName("th")[c];
col1[c]=row[b].getElementsByTagName("td")[c];
if(col1[0].innerHTML==document.getElementById('column').value)
{
tab[a].style.display='block';
row[b].style.display='block';
row[0].style.display='block';
}
}
}
}
} thanks