• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Alignment of table during filteration

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.

Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.

And you'll probably need to better explain your problem. Your post is extremely vague.
reply
    Bookmark Topic Watch Topic
  • New Topic