How do I change the header text on a WebDialogWindow in Javascript.
I have tried this.
var header = oWebDialogWindow.get_header();
header.setCaptionText(hdnSubject.value);
However, it keeps telling me that the header is null.
Hey there, this is for anyone else coming across this post. This seems to work for me in version 10.2: (Just a note, that I had actually set the Caption Text to a default text value in the designer that I changed in the code below)
var
);
dialog._elements[1].innerHTML =
"PD Preferences";
Hi,
The header is accessible after dialog was initialized. For example, you may process ClientEvents.Initialize and implement it by something like below:
function initDialog1(dialog, evtArgs){ dialog.get_header().setCaptionText('Client Caption');}
You also may try to use internal member dialog._header, but while initialization it can be reset, so, your codes may have no effect or raise exception.
Have you found a solution for this? From what I have seen the function get_Header returns null if the dialogwindow is not in a "ready" or apparently "hidden" state.
I was able to change the header using this:
var webDialogWindow = $find('<%= webDialogWindow.ClientID %>');webDialogWindow._header._props[0] = "My header";
I also tried the following:
var webDialogWindow = $find('<%= webDialogWindow.ClientID %>');webDialogWindow.set_windowState(0x0);webDialogWindow._header.setCaptionText("My Header");
http://forums.infragistics.com/forums/p/6584/27883.aspx
Setting the caption after showing the dialog also solves this problem:
var webDialogWindow = $find('<%= webDialogWindow.ClientID %>');webDialogWindow.show();webDialogWindow._header.setCaptionText("My Header");