Hi guys, let's get straight to the problem.

First, I have this "deal-post" table (actually <tbody> content is
generated dynamically from PHP code, but I omitted it here and make it
static for simplicity sake):

<table width="500px" id="deal-post" border="1">
        <thead>
                <tr valign="top" class="column-header">
                        <th width="35%">Posting</th>
                        <th width="25%">Description</th>
                        <th width="30%">Amount (Rp.)</th>
                        <th width="10%">(%)</th>
                </tr>
        </thead>
        <tbody>
                <tr valign="top" class="even">
                        <td>Posting 1<input type="hidden" value="10" 
name="hidPostCompId[]"/
></td>
                        <td align="center" style="padding: 0pt 3px;">
                                <input type="text" class="table-textbox" 
name="dealDesc[]"/>
                        </td>
                        <td align="center" class="post-amount" style="padding: 
0pt 3px;">
                                <input type="text" class="table-numericbox 
deal-post"
name="dealAmount[]"/>
                        </td>
                        <td align="right" class="post-percent"></td>
                </tr>
                <tr valign="top" class="odd">
                        <td>Posting 2<input type="hidden" value="3" 
name="hidPostCompId[]"/
></td>
                        <td align="center" style="padding: 0pt 3px;">
                                <input type="text" class="table-textbox" 
value="" name="dealDesc
[]"/>
                        </td>
                        <td align="center" class="post-amount" style="padding: 
0pt 3px;">
                                <input type="text" class="table-numericbox 
deal-post" value=""
name="dealAmount[]"/>
                        </td>
                        <td align="right" class="post-percent"></td>
                </tr>
                <tr valign="top" class="even">
                        <td>Posting 3<input type="hidden" value="4" 
name="hidPostCompId[]"/
></td>
                        <td align="center" style="padding: 0pt 3px;">
                                <input type="text" class="table-textbox" 
value="" name="dealDesc
[]"/>
                        </td>
                        <td align="center" class="post-amount" style="padding: 
0pt 3px;">
                                <input type="text" class="table-numericbox 
deal-post" value=""
name="dealAmount[]"/>
                        </td>
                        <td align="right" class="post-percent"></td>
                </tr>
                <tr valign="top" class="odd">
                        <td>Posting 4<input type="hidden" value="8" 
name="hidPostCompId[]"/
></td>
                        <td align="center" style="padding: 0pt 3px;">
                                <input type="text" class="table-textbox" 
value="" name="dealDesc
[]"/>
                        </td>
                        <td align="center" class="post-amount" style="padding: 
0pt 3px;">
                                <input type="text" class="table-numericbox 
deal-post" value=""
name="dealAmount[]"/>
                        </td>
                        <td align="right" class="post-percent"></td>
                </tr>
        </tbody>
        <tfoot>
                <tr>
                        <td></td>
                        <td align="right">Sell Price :</td>
                        <td align="right" class="post-sell-price"></td>
                        <td></td>
                </tr>
        </tfoot>
</table>


I want to copy the textbox-value in [Amount] column (i give the <td />
a class name="post-amount") to respective index in [Current] column (i
give the <td /> a class name="inc-current") as in "deal-summary" table
below:

<table width="500px" id="deal-summary" border="1">
        <thead>
                <tr valign="top" class="column-header">
                        <th width="40%">Posting</th>
                        <th width="30%">Total</th>
                        <th width="30%">Current</th>
                </tr>
        </thead>
        <tbody>
                <tr valign="top" class="even">
                        <td>Posting 1</td>
                        <td align="right" class="inc-total"></td>
                        <td align="right" class="inc-current"></td>
                </tr>
                <tr valign="top" class="odd">
                        <td>Posting 2</td>
                        <td align="right" class="inc-total"></td>
                        <td align="right" class="inc-current"></td>
                </tr>
                <tr valign="top" class="even">
                        <td>Posting 3</td>
                        <td align="right" class="inc-total"></td>
                        <td align="right" class="inc-current"></td>
                </tr>
                <tr valign="top" class="odd">
                        <td>Posting 4</td>
                        <td align="right" class="inc-total"></td>
                        <td align="right" class="inc-current"></td>
                </tr>
        </tbody>
        <tfoot>
                <tr>
                        <td align="right">Sell Price :</td>
                        <td align="right" class="inc-sell-price"></td>
                        <td align="right" class="inc-total-current"></td>
                </tr>
        </tfoot>
</table>


It should work like this: when I type the numeric-amount in "dealAmount
[]" textbox, the value will be showing up instantly in "inc-current"
column in "deal-summary" table in the same row index with "deal-post"
table.

I am so desperate that I have been looking around across the internet,
including this forum, but I just can't get the idea.
Any help for me will be very appreciated.

Thanks!


Regards,

Reply via email to