Hi,
I think the easiest method is add an id in your td with value,

then do a
$$(".entries_list input:checked").each( function( elem ) {
  valor = $('value_' + $(elem).id).innerHTML;
  // Do stuff with it :P
});

On Thu, Sep 11, 2008 at 10:12 PM, Daniel Lopes <[EMAIL PROTECTED]>wrote:

>
> Hello, i'm trying create function that sum the content of td when
> other td in same tr has checkbox checked... i try use someting like $$
> (".entries_list input:checked") but return only input and not row or
> cell i want sum.
>
>
> <table width="100%">
>          <tr class="credit">
>                    <td><input id="entry_2" name="entry_2" type="checkbox"
> value="1" /></td>
>                    <td class="desc" >Pagamento 2ª parcela Inpacto
> Produções</td>
>                    <td class="category" ></td>
>                    <td class="value" id="value_entry_2">850,00</td>
>                    <td><a href="/accounts/2/entries/2">Exibir</a></td>
>                    <td><a href="/accounts/2/entries/2/edit">Editar</a></td>
>                  </tr>
>                  <tr class="debit category_2">
>                    <td><input id="entry_3" name="entry_3" type="checkbox"
> value="1" /></td>
>                    <td class="desc" >Pagamento</td>
>                    <td class="category" >retirada</td>
>                    <td class="value" id="value_entry_3">-20,00</td>
>                    <td><a href="/accounts/2/entries/3">Exibir</a></td>
>                    <td><a href="/accounts/2/entries/3/edit">Editar</a></td>
>                  </tr>
>        </table>
>
> I just want sum value cell when checkbox's on the same line is
> checked.
>
> Someone can help?
> Many thanks.
>
> >
>
-- 
Thanks,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to