My problem is that I do not know how to attach callback to the jquery ui dialog show.
The show is actually an option:
$( \".selector\" ).dialog({ sh
I found it necessary to use the "focus:" event. I was losing the correctly selected button because of the show:. Lovely interactions.
focus: function( event, ui ) { $(this).siblings('.ui-dialog-buttonpane').find("button:contains('Upload')").focus(); },