I have successfully integrated Java script into my Asp.net code behind file. However, I am facing an issue with update panels on the same page. Every time there is a change in any of the update panels, the script is automatically triggered. Is there a way to prevent this from happening? Removing the update panels is not an option as they are crucial for the functionality of the application. Currently, I am only calling an alert (rad alert with a set timeout function) when the Save Button is clicked or an Update routine is initiated. There are other buttons within the update panels and whenever one of them is clicked, the undesired script gets called. Any assistance would be greatly appreciated.
Below is the Page.ClientScript:
string radalertscript = "<script language='javascript'> Sys.Application.add_load(function(sender, e) {var oWnd = radalert('dialogMessage', 400, 140, 'Saved');window.setTimeout(function () { oWnd.Close(); }, 3000);});</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "radalert", radalertscript);