I have a standard dialog page that extends %ZEN.Dialog.standardDialog.
I would like to make sure it opens with a certain size. So I added
code in the onloadHandler event: window.resizeTo(800,800). But the
dialog will not resize in IE, it resizes properly in Firefox. For
regular zen pages, it resizes properly in both IE and Firefox.
Here is the code:
Main Page:
Class JYXTEST.ResizeTest Extends %
ZEN.Component.page
{
Parameter APPLICATION = "JYXTEST.ZENAPP";
Parameter PAGENAME;
Parameter DOMAIN;
XData Contents
{
<page xmlns="
http://www.intersystems.com/zen" title="">
<button id="idLaunchDialog" caption="Launch Dialog Page"
onclick="javascript:zenPage.LaunchDialog();"/>
<button id="idResize" caption="Resize"
onclick="window.resizeTo(500,500);"/>
</page>
}
Method LaunchDialog() [ Language = javascript ]
{
zenLaunchPopupWindow('JYXTEST.ResizeDialog.cls?','Test
Resizing','status,scrollbars,width=600,height=600');
}
/// This client event, if present, is fired when the page is loaded.
Method onloadHandler() [ Language = javascript ]
{
window.resizeTo(400,400);
}
}
The Dialog Page:
Class JYXTEST.ResizeDialog Extends %ZEN.Dialog.standardDialog
{
/// Class name of application this page belongs to.
Parameter APPLICATION = "JYXTEST.ZENAPP";
XData dialogBody
{
<pane title="Resize Test">
<titlePane title="Resize Test" width="100%" />
</pane>
}
/// Get the (localized) title string for the dialog.
/// This should be implemented in a subclass.
Method %OnGetTitle() As %String
{
Quit "Resize Test"
}
/// Get the (localized) subtitle string for the dialog.
/// This should be implemented in a subclass.
Method %OnGetSubtitle() As %String
{
Quit ""
}
/// Get the value that will be applied when the user presses the OK
button.
/// This is implemented by subclasses.
Method getDialogValue() [ Language = javascript ]
{
return "";
}
/// This callback is called after the server-side page
/// object and all of its children are created.<br>
/// Subclasses can override this to add, remove, or modify
/// items within the page object model, or to provide values
/// for controls.
Method %OnAfterCreatePage() As %Status
{
S %page.%GetComponentById("header").hidden=1
Q $$$OK
}
/// This callback, if defined, is called when the user presses the OK
or Apply action buttons.
/// If this returns false, then the action is cancelled.
Method ondialogFinish(action) [ Language = javascript ]
{
return false;
}
/// This client event, if present, is fired when the page is loaded.
Method onloadHandler() [ Language = javascript ]
{
window.resizeTo(800,300);
}
}