I want a client-side JavaScript function that fires when the WebDialogWindow state changes. In that function, I want to know what state the WebDialogWindow changed to. From my reading of the documentation, the following should work, but it gives me a JavaScript error "object doesn't support this property or method". How can I accomplish this?
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
function windowStateChanged(sender, args) {
alert(args.get_newWindowState());
};
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="300px" Width="400px">
<Header>
<MaximizeBox Visible="True"></MaximizeBox>
<MinimizeBox Visible="True"></MinimizeBox>
</Header>
<ClientEvents WindowStateChanged="windowStateChanged" ></ClientEvents>
<Resizer Enabled="True" />
</ig:WebDialogWindow>
</form>
</body>
Hi,
You can use following JavaScript function to get the DialogWindowState. Please remember that state is Enum:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR3.5/html/WebDialogWindow~Infragistics.Web.UI.DialogWindowState.html
<
script type ="text/javascript">
function windowStateChanged() {
var window = $find('<%= WebDialogWindow1.ClientID %>');
var state = window.get_windowState();
var stateText = null;
if (state == 3) stateText = "Hidden";
alert(stateText);