Firebug would be my choice...
The first problem is the premature closing of the object before the open line. (as pmw57 has already noted).
The second problem is that you are initializing dialog() on the button. When actually it should be initialized on a div and called from a click event of the button.
Maybe the code below will make it more clear:
title: 'Dynamically Loaded Page',
open: function ()
<button id="viewlog">Click here</button>