guyfromfl Posted August 31, 2009 Share Posted August 31, 2009 I am trying to make it so you can click the checkbox at the top, and it will hide all rows where the data of the Status column is "Complete" I am trying to decide the best way to do it, either check the data that is in the innerHtml, or like I have now, php determines what the value from the database is and adds class='complete' to the tr tag. Any suggestions? Here is the test table: http://bli.servehttp.com/bli/knowledgebase/issueList.php Quote Link to comment Share on other sites More sharing options...
Psycho Posted September 1, 2009 Share Posted September 1, 2009 No need to make the code more complex than it need to be by having it read the content. I would go with your second option. If you can't modify the class in an effective manner you could also set an id for each row that is complete in a numerical sequence: c_1, c_2, c_3, etc; Then when the user selects complete, just create a loop that sets the display property for each row. You would use a while loop such that the loop will exit when there are no more IDs that match Ex: var idx = 1; while (document.gertElementById('c_'+idx)) { //set row object display property idx++; } Quote Link to comment Share on other sites More sharing options...
guyfromfl Posted September 1, 2009 Author Share Posted September 1, 2009 I didn't want to have a bunch of td's with the id=complete so i think that might do it. Such an obvious solution! thanks, Ill give it a shot! Quote Link to comment Share on other sites More sharing options...
guyfromfl Posted September 1, 2009 Author Share Posted September 1, 2009 Thats it! Thanks for the help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.