Jump to content


Show/hide row <tr> depending on user selection from a drop-down menu

  • Please log in to reply
2 replies to this topic

#1 playaz

  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts

Posted 21 July 2006 - 10:28 AM

Hi guys,

My client keeps making variations to his demands.. now I have a similar problem to my earlier one.

I want to show or hide a <tr> row in a table depending on what the user selects, if the user selects options a,b or c then I want the <tr> with the id="one" to be shown & I want the <tr> with the id="two" to be hidden.
If the user selects d,e I want it to do the exact opposite, hide the <tr id="one"> while showing the <tr id="two".

How can this be done... i am pulling my hair out with this javascript :(

Can anyone help... my earlier thread may also be of use as this is very similar.

#2 nogray

  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 21 July 2006 - 04:41 PM

just use the same code I posted there, and instead of the div, make it a tr
<tr id="one" style="display:none;"><td>Hidden Text</td></tr>


#3 gluck

  • Members
  • PipPipPip
  • Advanced Member
  • 216 posts

Posted 21 July 2006 - 10:31 PM

use the style attribute to solve your issue.
I'm back baby!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users