View Single Post
Old 02-13-2009, 12:54 AM   PM User | #2
harbingerOTV
Senior Coder

 
Join Date: Jan 2005
Location: Memphis, TN
Posts: 1,769
Thanks: 8
Thanked 127 Times in 125 Posts
harbingerOTV will become famous soon enough
using this:

PHP Code:
$('tr input.blacklist').click(function() {
   var 
indenticalIP = $(this).parent().parent().find('td').eq(1).html();
      $(
'tr').each(function(){
         if($(
this).children('td').eq(1).html() == indenticalIP)
            $(
this).css('background','#96d');
      });
}); 
in a table like this:

Code:
<table>
<tr><td>stuff</td><td>1.1.1.1.1</td><td><input type="radio" class="blacklist" name="a1"></td></tr>
<tr><td>stuff</td><td>0.1.0.1.0</td><td><input type="radio" class="blacklist" name="a2"></td></tr>
<tr><td>stuff</td><td>1.1.1.1.1</td><td><input type="radio" class="blacklist" name="a3"></td></tr>
</table>
upon selecting the radio, grab the content of the second field. Then loop through all rows and all cells in that row. If any of the cells have the same content of the one clicked, it will then turn the row purple.

have fun.
__________________
Stop making things so hard on yourself.
i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis
harbingerOTV is offline   Reply With Quote