tik27 has probably the best general answer (and it explains why it doesn't work out of the box).
If you don't want to do the evaluating by yourself, Dojo also has a module/widget called dojox/widget/DialogSimple
(and dojox/widget/Dialog
) and it has a property executeScripts
. If you enable it, it will evaluate all scripts on that page.
So if you don't want to do the script evaluation yourself, try using this widget.