...

View Full Version : Show / Hide Expired Dates



sftl99
07-14-2005, 04:20 PM
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:

<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?

sftl99
07-14-2005, 09:19 PM
I solved this by going server side with my PHP.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum