Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic