PDA

View Full Version : yui simpledialog not showing



KuN
1 Nov 2006, 2:21 AM
YAHOO.namespace("example.simpledialog");
function initDialog() {
var handleCancel = function(e) {
alert("You clicked 'Cancel'!");
this.hide();
}

var handleOK = function(e) {
alert("You clicked 'OK'!");
this.hide();
}

YAHOO.example.simpledialog.dlg = new YAHOO.widget.SimpleDialog("dlg", { visible:false, width: "20em",
fixedcenter:false, modal:true, draggable:false, zIndex: 999 });

YAHOO.example.simpledialog.dlg.setHeader(modalMessageHeader);
YAHOO.example.simpledialog.dlg.setBody(modalMessageBody);

YAHOO.example.simpledialog.dlg.cfg.queueProperty("icon",YAHOO.widget.SimpleDialog.ICON_WARN);
YAHOO.example.simpledialog.dlg.cfg.queueProperty("buttons", [
{ text:"OK", handler:handleOK, isDefault:true },
{ text:"Cancel", handler:handleCancel }
]);

var listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn:handleCancel ,scope:YAHOO.example.simpledialog.dlg, correctScope:true} );
YAHOO.example.simpledialog.dlg.cfg.queueProperty("keylisteners", listeners);

YAHOO.example.simpledialog.dlg.render(document.body);
}


code was taken from example. rendered to document.body, no dialog shows at all... zIndex = 999. what should i try?

KuN
1 Nov 2006, 2:25 AM
problem solved by itself:)
did include not the one container.css i needed:)