X-Git-Url: http://git.rot13.org/?p=MojoFacets.git;a=blobdiff_plain;f=public%2Fedit_table.js;h=f57f833f1db30b8682790167bf72efac0ab0c5f4;hp=d3422eb68cdb451838cd302938c69d1a822d6f00;hb=HEAD;hpb=bccfa39efb5c58bfe00e2c422662f900f14a93f9 diff --git a/public/edit_table.js b/public/edit_table.js index d3422eb..f57f833 100644 --- a/public/edit_table.js +++ b/public/edit_table.js @@ -13,8 +13,13 @@ var cell_blur = function() { */ var _row_id = $(this).parent().parent().attr('title'); - var x = $(this).parent().attr('cellIndex'); - var y = $(this).parent().parent().attr('rowIndex'); + var x = $(this).parent().index(); + var y = $(this).parent().parent().index(); + + if ( x == null || y == null ) { + console.error('no x ', x, ' or y ', y, ' defined'); + return; + } var new_content = $(this).val(); // $(this).replaceWith( new_content );