title: uncaught exception error "Illegal operation on WrappedNative prototype object"
body: <p>Is there any idea why the following javascript/jquery code might produce the error message:
  uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object"] ?</p>
  
  <p>Code:</p>
  
  <pre><code>function deletereceipt(id){
   var $delconfdialog = $('&lt;div id="dialog-confirm"&gt;&lt;/div')
                         .html('Are you sure you want to delete this receipt?')
                         .dialog({
                            autoOpen: true,
                            title: 'Delete Confirmation',
                            buttons: {
                               "Delete": function(){
                                  $.post('Receipt.py',{'cm':'Delete','receiptid': obj},function(){
                                     $('#receiptrow'+id).remove();
                                  });
                                  $(this).dialog('close');
                               },
                               "Cancel" :function(){
                                  $(this).dialog('close');   
                               }
                            }
                         });
      }
  </code></pre>