cool.
Thanks Sébastien...
I think I am 99% done what I wanted to get done.
Just wondering when you 'close' a Window, it still holds the div for
you in the DOM.
But when closing a Dialog, it only keeps overlay_modal, and not the
popup div itself (so in code below winAlert.show(); wont work unless
set to null when onCancel).
So for following code have to reset winAlert to null, so next time
user clicks button, it can recreate the popup. I guess what im saying
Dialog behavior seems unusual to me versus Window, and was wondering
whats the reason was.
like for Window's, you hit X to close window
which to me is
the equivalent of hitting Cancel in Dialogs. but in Dialog, it deletes
only part of the elements in DOM it made. So then I assume, maybe Seb
views Dialogs as one-time popup windows so he gets rid of DOM elements
when u hit Okay or Cancel... but if you hit Okay, it will still keep
both window elements in DOM.
Just curious why have it like that.
Thanks!,
Arian
function makeDialogPopup()
{
if( !winAlert )
{
winAlert = Dialog.confirm
(
'TEST',
{
width:400,
okLabel: "OKAY",
cancelLabel: "CANCEL",
className:"alert",
buttonClass: "myButtonClass",
id: "winAlert",
onOk:function() {
submitResolution(winAlert); }, //return
true;makes dialog box disappear
onCancel:function(){ winAlert=null; }
}
);
}
else //popup created before so show it. (user hit OKAY be4 so still
exists on the page)
winAlert.show();
}
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com