Since id
is unique, you need to use class instead:
<td style="height:15px"><input type="button" class="opener" value="Edit" onClick="currentroom( 0,0 )">
then you can do:
$(function() {
$("#dialog" ).dialog({ autoOpen: false });
$(".opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
});
});
Also, remember to wrap your code inside DOM ready handler $(function() {...});
to make sure all of your DOM elements are added properly before executing your javascript.