Help coderanch get a
new server
by contributing to the fundraiser
  • 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • 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: 67750
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic