Hi everyone. I'm a little stuck trying to append a row to an existing table. I do a simple ajax call that returns the HTML row to insert into the table:

$.get("product.cfm", { productid: thisID },
         function( msg ){
        /* Add the new row to the cart table */
        $("#cartTable").append( msg );
                
         }
);                      

Firebug is telling me that the value of msg (the return value from the ajax call) is:

<tr id='cartRow_897'>
        <td><input type='text' size='3' name='qty_897'></td>
        <td>2 Pints (16-oz) - Coconut Cream Concentrate - BUY 1 GET 1 FREE!</td>
        <td><input type='text' size='7' name='price_897'></td>
<td><img src='images/idelete.gif' width='16' height='16' alt='Remove item from Cart' border='0' id='removeRow_897'></td>
</tr>

but if you look at the pic attached to the email, you'll see that the row is coming out all screwed up. If I do this:

$("#cartTable").append( '<tr><td>1</td><td>VCNO16</td><td>Test</td><td>$10.00</td><td>Del</td></tr>' );

Everything is inserted correctly. Its only when I get results back from my called script.

Any help would be greatly appreciated.

Rey...






<<attachment: table.jpg>>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to