I am having an issue with the following code. The execute function executes not on the submit of the form (there is a button being created) but before the dialog even appears. The flow of the program is simply you click on a button and the dialog is supposed to be created. Any help would be greatly appreciated.
dojo.addOnLoad(function(){
theDialog = new Dijit.Dialog({});
theDialog.attr("Class", "soria");
}
function createDialog(){
theDialog.attr("title", "Add New");
theDialog.attr("Content", buildContent());
theDialog.attr("execute", alert('hello'));
dojo.parser.parse(theDialog.parentNode);
theDialog.show();
}