I am using asp.net 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.
Dialog._header.get_element().getElementsByTagName(
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,Kostas
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:-
var
oWebDialogWindow1 = $find('<%= newuserPopup.ClientID %>');ShowPopup(true)var header = oWebDialogWindow1.get_header();if (header == null) alert ("No header found");else header.setCaptionText("Edit User");
This seems to work fine for me
Hi, you can set the Caption of a webdialogwindow without use javascript like this
<
</ig:WebDialogWindow>
Hey Kostas!Here is how I was able to set the CaptionText of a WebDialogWindow in a quick sample I just built.In the WebDialogWindow I first added a ClientEvent Initialize...<ClientEvents Initialize="Init" />Then I added the function Init(); to my JavaScript portion of my document.<script type="text/javascript"> function Init() { var dialog = $find('<%=WebDialogWindow1.ClientID%>'); var header = dialog.get_header(); header.setCaptionText('TEST'); }</script>The ID of my WebDialogWindow is "WebDialogWindow1" so in the Javascript, just change thatto whatever your WebDialogWindow is, also I had to add that to the Initialize event becauseI tried to use "var dialog = $find('<%=WebDialogWindow1.ClientID%>');" but it was being calledbefore the WebDialogWindow was even finished being created on the Client, so it kept returningback to be "null" .I hope this helps.Just let me know!-Tim
Kostas,
Sorry, I can't be of much help here, but I think that you want to use innerHTML instead of innerText. I believe that innerText is IE-only.
Good luck,
-Eric