Skip to main content

ASPxClientPopupControl.ShowWindow(window) Method

Invokes the specified popup window at the popup element with the specified index.

Declaration

ShowWindow(
    window: ASPxClientPopupWindow,
    popupElementIndex?: number
): void

Parameters

Name Type Description
window ASPxClientPopupWindow

A ASPxClientPopupWindow object that specifies the required popup window.

popupElementIndex number

The index of the popup element within the window’s PopupElementID list.

Remarks

ASPxPopupControl contains IDs of objects that can invoke a popup window within the window’s PopupElementID property. Use the ShowWindow method to show the specified popup window at the element with the specified index within the list. A window’s position relative to the element can be specified by the PopupHorizontalAlign, PopupHorizontalOffset, PopupVerticalAlign and PopupVerticalOffset properties.

If the specified popupElementIndex is incorrect, the window presents at the last position or at the top left corner (if it is the first time it is displayed).

function SetHintVisible(name, value) {
    var popupControl = GetPopupControl('Hint');
    var hintWindow = popupControl.GetWindowByName(name);
    if (value)
        popupControl.ShowWindow(hintWindow);
    else
        popupControl.HideWindow(hintWindow);
}
// ...
function GetPopupControl(name) {
    if (name == 'Hint')
        return ASPxPopupHintClientControl;
    else if (name == 'Error')
        return ASPxPopupErrorClientControl;
}
<dx:ASPxPopupControl ClientInstanceName="ASPxPopupHintClientControl" ID="pcHint" runat="server" ...>
    <Windows>
        <dx:PopupWindow Name="Login" Text="Login should consist of &lt;b&gt;a-z&lt;/b&gt;."
            PopupElementID="txtLogin">
        </dx:PopupWindow>
        <dx:PopupWindow Name="Password" Text="Password should consist of &lt;b&gt;0-9&lt;/b&gt;."
            PopupElementID="txtPassword">
        </dx:PopupWindow>
        <dx:PopupWindow Name="Email" Text="For instance, &lt;b&gt;myname@example.com&lt;/b&gt;. 
            This will be used to sign-in to your account." PopupElementID="txtEmail">
        </dx:PopupWindow>
    </Windows>
    <!-- ... -->
</dx:ASPxPopupControl>

<dx:ASPxPopupControl ClientInstanceName="ASPxPopupErrorClientControl" ...>
    <!-- ... -- >
</dx:ASPxPopupControl>

<input style="width: 150px;" onblur="SetHintVisible('Login', false);" onfocus="SetHintVisible('Login', true);"
  onchange="TextBox_OnChange();" id="txtLogin" type="text" />

Online Demo

Run Demo: ASPxPopupControl - Client-Side Functionality

See Also