Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2005
    Location
    austin, tx
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Show / Hide Expired Dates

    I have a page that is outputting data via PHP from a MySQL database. I have an input field that is "hidden" that has an expiration date associated with it. What I want to be able to do is write a javascript that will find every row (tr) that contains an expired date and hide or show it. So, in the instance of:
    Code:
    <table width="550" border="0" cellspacing="0" cellpadding="0"><tr><input name='expiration' type='hidden' value='07/17/2005'> 
          <td width=70>&nbsp;<a href='?id=2'>5120</a></td>
          <td width=85>07/13/2005</td>
          <td width=65>54320</td>
          <td width=135>Citigroup</td>
          <td width=190><a href='mailto:none@none.com'>none@none.com</a></td></tr></table>
    <table width="550" border="0" cellspacing="0" cellpadding="0"><tr><input name='expiration' type='hidden' value='07/13/2005'> 
          <td width=70>&nbsp;<a href='?id=4'>5122</a></td>
          <td width=85>07/13/2005</td>
          <td width=65>12345</td>
          <td width=135>Bank of America</td>
          <td width=190><a href='mailto:none@gmail.com'>none@gmail.com</a></td></tr></table>
    I would want to hide the second entry when the toggle link is clicked because the 'expiration date' has already passed. I know this is pretty stinkin complicated...is it even possible? Does anyone have any ideas?

  • #2
    Regular Coder
    Join Date
    Apr 2005
    Location
    austin, tx
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I solved this by going server side with my PHP.
    Last edited by sftl99; 07-15-2005 at 09:36 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •