Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
575
Close, min and max buttons hide on client
posted

Hello,

How can you show/hide the three header buttons through javascript.

I have tried a bunch of things and none have worked.

 

Thank you,

Brandon

Parents
No Data
Reply
  • 24497
    Suggested Answer
    posted

    Hi Brandon,

    WebDialogWindow does not expose public references to buttons. However, its header has internal variables _closeButton, _minButton and _maxButton (their type is $IG.DialogButton). That object has standard ajax method get_element(). It is also possible to find reference to that html element by traversing within DOM of dialog/header. You also may try to use debugger and check all (internal) member variables and functions.
    Below is example to acces html element of min-button.

    <script type="text/javascript">
    function hideButton()
    {
     var dialog = $find('<%=WebDialogWindow1.ClientID%>');
     var header = dialog.get_header();
     //debugger;
     if(!header)
      return;
     var minButton = header._minButton;
     if(!minButton)
      return;
     var style = minButton.get_element().style;
     style.display = 'none';
     style.visibility = 'hidden';
    }
    </script>

    <input type="button" value="hideButton" onclick="hideButton()" />
    <ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="198px"
       Width="450px">
       <Header>
        <MinimizeBox Visible="True"></MinimizeBox>
       </Header>
    </ig:WebDialogWindow>

Children
No Data