Hello,
Newbie here... Using AJAX RadControls with VS 2010.
I want to display a "Data Saved" info message box from the server side when a "Save" button is pressed.
I did this by adding the appropriate javascript to display a RadAlert in the onload() event for the page.
The good news is that the message does show up in the RadAlert in the onload. But.... the
problem is that if the user navigates away from the page & then returns ( via the Back button),
the onload() fires again and the RadAlert is displayed.
This isn't a Telerik problem, but thought you may have come across this problem before.
Any recommendations as to how this RadAlert will only be shown once
( displayed when user press button but NOT on Browser BACK).
here is my code snippet below.
Thank in advance,
bruce
-----------------------------------------------------------------
string message = "Data saved";
string script1 = "<script language='javascript'> window.onload = function(){radalert('";
Newbie here... Using AJAX RadControls with VS 2010.
I want to display a "Data Saved" info message box from the server side when a "Save" button is pressed.
I did this by adding the appropriate javascript to display a RadAlert in the onload() event for the page.
The good news is that the message does show up in the RadAlert in the onload. But.... the
problem is that if the user navigates away from the page & then returns ( via the Back button),
the onload() fires again and the RadAlert is displayed.
This isn't a Telerik problem, but thought you may have come across this problem before.
Any recommendations as to how this RadAlert will only be shown once
( displayed when user press button but NOT on Browser BACK).
here is my code snippet below.
Thank in advance,
bruce
-----------------------------------------------------------------
string message = "Data saved";
string script1 = "<script language='javascript'> window.onload = function(){radalert('";
string script2 = "', 300, 120);}</script>";
string script = script1 + message + script2;
ClientScriptManager cs = p.ClientScript;
String csname1 = "PopupScript";
Type cstype = p.GetType();
cs.RegisterStartupScript(cstype, csname1, script);