Good day,
We need help with the following problem:
We have a masterpage with 3 different contentplaceholders. One of these (the 'body' contentplaceholder) loads a simple page, which is basically straight from your radwindowmanager samples from here: http://demos.telerik.com/aspnet-ajax/window/examples/windowmanager/defaultcs.aspx
In this 'body' we have the a button:
runat="server" OnCommand="openalert_Click"
In the cs
protected void openalert_Click(Object sender, CommandEventArgs e)
{
ViewAlert(rwp, "test", rwp.Page);
}
where the ViewAlert function is basically this:
public static RadWindowManager ViewAlert(RadWindowManager radWinmanager, String Warning = null, Page pTarget = null) {
string radstrcommand = "radalert('" + Warning + "', 200, 200, 'Test', null);";
System.Web.UI.ScriptManager.RegisterStartupScript(pTarget, pTarget.GetType(), "call_radalert", radstrcommand, true);
}
Our problem is that any and all attempts to successfully open a radalert after pressing of the button are met with failure.
Using firebug we know that
radWindow is undefined
and
GetRadWindowManager returns undefined
whenever the page reloads after the RegisterStartupScript
We conclude this to be a timing / load order issue of some sort, related to the load time of the radWindow in respect to the trigger of the RegisterStartupScript, but how are we supposed to solve it?
Is there perhaps a better approach to manage the RegisterStartupScript (we don't use ajax for this particular case since we need a postback)
Thanks in advance
We need help with the following problem:
We have a masterpage with 3 different contentplaceholders. One of these (the 'body' contentplaceholder) loads a simple page, which is basically straight from your radwindowmanager samples from here: http://demos.telerik.com/aspnet-ajax/window/examples/windowmanager/defaultcs.aspx
In this 'body' we have the a button:
runat="server" OnCommand="openalert_Click"
In the cs
protected void openalert_Click(Object sender, CommandEventArgs e)
{
ViewAlert(rwp, "test", rwp.Page);
}
where the ViewAlert function is basically this:
public static RadWindowManager ViewAlert(RadWindowManager radWinmanager, String Warning = null, Page pTarget = null) {
string radstrcommand = "radalert('" + Warning + "', 200, 200, 'Test', null);";
System.Web.UI.ScriptManager.RegisterStartupScript(pTarget, pTarget.GetType(), "call_radalert", radstrcommand, true);
}
Our problem is that any and all attempts to successfully open a radalert after pressing of the button are met with failure.
Using firebug we know that
radWindow is undefined
and
GetRadWindowManager returns undefined
whenever the page reloads after the RegisterStartupScript
We conclude this to be a timing / load order issue of some sort, related to the load time of the radWindow in respect to the trigger of the RegisterStartupScript, but how are we supposed to solve it?
Is there perhaps a better approach to manage the RegisterStartupScript (we don't use ajax for this particular case since we need a postback)
Thanks in advance