missing ; before statement : $(this).closest('tr').find('.tableRow'){\n <pre><code>$('.removeItem').live('click',function(){ var postData = {}; $(this).closest('tr').find('.tableRow'){ var keyPrefix = 'data[' + index + ']'; postData[keyPrefix + '[index]'] = $(this).closest('tr').find('.row_id').text(); postData['data['+ index +'][order_id]'] = $('#order_id').text(); }; </code></pre> <p>I'm not sure if its obvious what i'm trying to do but can anyone spot where i'm going wrong?</p> <p>EDIT:</p> <p>Completely my fault, was slightly misleading in my original post, this is my complete code:</p> <pre><code>$('.removeItem').live('click',function(){ var postData = {}; $(this).closest('tr').find('.tableRow'){ var keyPrefix = 'data[' + index + ']'; postData[keyPrefix + '[index]'] = $(this).closest('tr').find('.row_id').text(); postData['data['+ index +'][order_id]'] = $('#order_id').text(); )}; $.ajax ({ type: "POST", url: "deleterow.php", dataType: "json", data: postData, cache: false, success: function() { alert("Item Deleted"); } }); $(this).closest('tr').remove(); calcTotal(); }); </code></pre>