On Sep 12, 7:12 am, 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" >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" >-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.

Why not use the elements the way they were intended?  Tables are meant
for layout, forms provide a way for users to interact with data - put
the checkboxes in a form and give them the value you want them to
have.    e.g.

<form ...>
  <table ...>
    <tr ...>
      <td><input id="entry_2" name="entry_2" type="checkbox"
      <td class="desc" >...

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 

Reply via email to