I am using the dialog window to show success or failure status'.
I have the following code in BLOCKED SCRIPT
var dialog = $find("ctl00_cphContent_wdwAlert");var header = dialog.get_header();
I can get the reference to the dialog window just fine, but it seem that the only way to get the header is to set it's state to normal by doing the following:
var state = dialog.set_windowState($IG.DialogWindowState.Normal);
Am I missing something?
Thanks...
Hi,
If at the time of you call the WebDialogWindow was never painted (like hidden on start), then get_header() returns null, because its html elements are not configured.
I think that if you need just to set its caption, then it can be done. You may try to use internal member variable _header instead of get_header function (though no support in case of misbehavior).
Hello,
What Viktor is referring to is that this is considered a not supported scenario and the workaround he suggested may not work in all scenarios. The reasons for this are explained in the post above. Browsers and HTML are a tricky topic and sometimes not all scenarios are supported out of the box, some of them require tweaks.
Here's a funny workaround though, if you're working from the client, you can show it first, and then set the header within the same method
infoWin.show();
infoWin._header.setCaptionText("Title");
}
This should appear to the user as if it was set before had.