I have some html like this:
Volume =
This can be easily done by doing:
$(this).closest('table').attr('id');
You attach this to any object inside a table and it will return you the id of that table.