In server-side I do some validation and then show a radwindow. If this code is sent via a normal request, the autosize feature works, but it i sent via ajax then it doesn't
Any idea? Thanks!
| string script = @"var oWindowMsg = top.window.radopen('Hello World', null); |
| oWindowMsg.setSize(200, 200); |
| oWindowMsg.set_modal(true); |
| oWindowMsg.set_visibleStatusbar(false); |
| oWindowMsg.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close); |
| oWindowMsg.add_pageLoad(function () { oWindowMsg.autoSize(true) });"; |
| if (RadScriptManager.GetCurrent(this).IsInAsyncPostBack) |
| { |
| RadAjaxManager.GetCurrent(this).ResponseScripts.Add(script); |
| } |
| else |
| { |
| this.ClientScript.RegisterStartupScript(this.GetType(), "mostrarMensaje", String.Format("<script language='javascript'>function f(){{{0}; Sys.Application.remove_load(f);}}; Sys.Application.add_load(f);</script>", script)); |
| } |
Any idea? Thanks!
