• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hiding group of rows depending on dropdown list

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting all the rows and column of a table in my page.And in dropdown list i am giving column name depending on cloumn name i have to show value of that column.
Can any one explani me how to do the same using Javascript
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question is not clear.

You want to hide table columns?

Eric
 
manisha makwana
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,

In a dropdown list i have all the column name say A,B,C,D.And in my resultset i have a row whose name is A,B,C,D.And in resultset i have this value for user X,Y,Z.if from drop down list user select B then i want to display row B for user X,Y,Z.I have to do this by hiding row depneding on criteria form dropdown list.
Can you please help me to do the same.
User X
======================================
A
B
C
D
====================================
User Y
A
B
C
D
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written a similar example using jQuery. See if it fits your need.

Live demo: Demo for selection box matching table column
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can hide columns by using colgroup and setting the display to none for col.

Eric
 
Cloudgen C.F. Wong
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:You can hide columns by using colgroup and setting the display to none for col.

Eric



I tried using the colgroup for accessing the collaborative style properties. I find out it's not work for some web-browser (in my test, opera 10.0 beta) and not work for some style properties, too.

See, the test page for changing column's background color: my test page 1

The test page for changing column's "display" property: my test page 2

 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic