Create the extra buttons before you create the dialog, with something like this:
Code:
myzimlet.prototype.setupDialog =
function() {
var infoButtonId = Dwt.getNextId();
this._infoButton = new DwtDialog_ButtonDescriptor(infoButtonId, "More Info");
var chpassButtonId = Dwt.getNextId();
this._chpassButton = new DwtDialog_ButtonDescriptor(chpassButtonId, "Change Password");
this._dlg = new DwtDialog({parent: ..., title: '...', standardButtons: [DwtDialog.DISMISS_BUTTON], extraButtons: [this._infoButton, this._chpassButton]});
this._dlg.setButtonListener(infoButtonId, new AjxListener(this, this.dlgButtonHandler, "info"));
this._dlg.setButtonListener(chpassButtonId, new AjxListener(this, this.dlgButtonHandler, "chpass"));
this._dlg.setButtonListener(chpassButtonId, new AjxListener(this, this.dlgButtonHandler, ""));
};
myzimlet.prototype.dlgButtonHandler =
function(action) {
this._dlg.popdown();
this._dlg.dispose();
switch (action) {
case "info":
window.open(infoURL, "More Info");
break;
case "chpass":
window.open(chpassURL, "Change Password");
break;
}
};