Hi,
I'm adding a RadWindow in the page's init event so I can use it to display async postback errors. But when I try to open the RadWindow on the client, I get the following javascript error:
"Cannot read property 'style' of null" in this codeblock:
Thats my server-side code:
and this is what I do client-side:
Is there something I forgot? I'm using the RadWindow at other locations where it works fine.
Thanks for your help!
I'm adding a RadWindow in the page's init event so I can use it to display async postback errors. But when I try to open the RadWindow on the client, I get the following javascript error:
"Cannot read property 'style' of null" in this codeblock:
if(this._dockMode){this._contentElement.style.width="1px";Thats my server-side code:
RadWindow window = new RadWindow(); window.ID = "AsyncErrorMessageWindow"; window.ClientIDMode = ClientIDMode.Static; HtmlGenericControl contentDiv = new HtmlGenericControl("div"); contentDiv.ID = "AsyncErrorMessageWindowContent"; contentDiv.Attributes["class"] = "AsyncErrorMessageWindow_Content"; window.ContentContainer.Controls.Add(contentDiv); Form.Controls.Add(window);function onEndRequest(sender, args) { // error handler if (args.get_error()) { var message = args.get_error().message; args.set_errorHandled(true); if (args.get_error().name === 'Sys.WebForms.PageRequestManagerServerErrorException') { if (args._error.httpStatusCode == 0) { return false; } } var window = $find('AsyncErrorMessageWindow'); var windowContent = $('.AsyncErrorMessageWindow_Content'); windowContent.text(message); window.set_modal(true); window.set_title(ae_data.title); window.autoSize(); window.show(); } return true;}Is there something I forgot? I'm using the RadWindow at other locations where it works fine.
Thanks for your help!