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
WebDialogWindow Javascript Error

I am using 2.0 infragistics controls 2008 vol 2.
When i try to set the caption text of a WebDialogWindow using javascript i have the following issues.

1) First i get a reference of the dialog window using var Dialog = $find(DialogControlId);

2) When i use Dialog.get_header() to get the header element null is returned. If i use instead Dialog._header i manage to reach the header element. But then again when i use Dialog._header.setCaptionText('Some Caption') an exception 'this._elems.7' is null or not an object Error' is thrown.

I managed to set the caption by using

Dialog._header.get_element().getElementsByTagName('span')[0].innerText = 'Some Caption';

but i think this is not the way it should work.

Please let me know if this a minor javascript bug or there is something i am missing.

Kind regards,

No Data
  • 2700
    Offline posted

    I had the same problem setting the title and found that I could not get the header before showing the dialog - I was using this as a pop-up add/edit item window).  As such my code was:-










    oWebDialogWindow1 = $find('<%= newuserPopup.ClientID %>');
    var header = oWebDialogWindow1.get_header();
    if (header == null)
    lert ("No header found");
    header.setCaptionText("Edit User");

    This seems to work fine for me

No Data