function removebox(value) {
var obj = $(".mouseOver input");
for(var i = 0; i < obj.length; i++) {

if(obj.eq(i).attr("value") == 5) {
obj.eq(i).remove();
break;
}

}
}

On Mon, May 11, 2009 at 11:03 PM, m...@linuxtime.it <m...@linuxtime.it> wrote:

>
> Hi all,
>
> how do I remove a row of a table by knowing the value (returned by a PHP
> script) of the checkbox which is inside a cell?
>
> Example, the value is 5.
>
> How can I remove the line containing the checkbox with the value 5?
>
> <table>
> <tr class="mouseOver">
>  <td><input type="checkbox" value="1" name="chk[]"/></td>
>  <td>foo</td>
> </tr>
> <tr class="mouseOver">
>  <td><input type="checkbox" value="5" name="chk[]"/></td>
>  <td>foo2</td>
> </tr>
> <
> <tr class="mouseOver">
>  <td><input type="checkbox" value="10" name="chk[]"/></td>
>  <td>foo2</td>
> </tr>
> </table>
>
>

Reply via email to