We use dijit.Dialog to display dynamic content. The dialog resizes when the new content loads, but does not get re-centered. This looks odd, esp. when the dialog is large enough to go past the right and/or bottom edges of the browser. While I can think of a few workarounds (like executing Dialog._position after loading new content), I would prefer a solution that can detect when the Dialog size is changed and re-center it. Can anyone suggest a way to do this, or a better workaround?
center
Re-center dialog when it's contents changes?
Submitted by gkasparek on Fri, 01/18/2008 - 21:08.
- Login or register to post comments
- Unsubscribe post
Dialog Box not center screen
Submitted by digitalexpl0it on Wed, 11/28/2007 - 18:16.
Hey all,
I am using dojo toolkit 9.0 and I have a registration form in a dialog box which works fine, however when the dialog box appears it doesn't display in the center of the screen. Instead it is loaded on the bottom right of the page. How can I change the position of a dialog box? All I want it to do is load (top, center)
<--script-->
function load() {
dijit.byId('registershow').show();
}
<--/script-->
<--body onload="load();"-->
<--div dojoType="dijit.Dialog" id="registershow" title="OpenOffer Registration Form"-->
...form code...
<--/div-->
Thanks
D
