Jump to content


Photo

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

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.
http://www.phpfreaks...c,100859.0.html


#2 nogray

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>

NoGray.com


#3 gluck

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