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
340
WebDialogWindow: Setting CaptionText from JavaScript?
posted

How would I go about setting the CaptionText of a webdialogwidow from javascript?

  • 24497
    Suggested Answer
    posted

    Hi,

    You may get reference to Infragistics.Web.UI.Header object by get_header() member function of dialog and use setCaptionText(text) member function of header. Below is example:

    <script type="text/javascript">
      function dialogLoaded(dialog)
      {
        dialog.get_header().setCaptionText('loaded');
      }
      function setCaption()
      {
        var dialog = $find('<%=WebDialogWindow1.ClientID%>');
        dialog.get_header().setCaptionText('from button');
      }
    </script>
    <ig:WebDialogWindow ID="WebDialogWindow1" runat="server">
        <ClientEvents Loaded="dialogLoaded" />
    </ig:WebDialogWindow>
    <input type="button" value="set caption" onclick="setCaption()" />