Method on
was introduced in jQuery version 1.7.
I think you have to upgrade your jQuery library to the newest version.
Otherwise, you can use live
instead:
$("tbody td").live('dblclick',function (e) {
var id = $(this).closest('tr').attr('id');
alert(id);
});