In my asp.net user control, I add a few script to the window.onload event, for example:
if (!Page.ClientScript.IsStartupScriptRegistered(this.GetType(), onloadScriptName)) Page.ClientScript.RegisterStartupScript(this.GetType(), onloadScriptName, "window.onload = function() {myFunction();};", true);
My problem: if there is already something in the onload event, this overwrites. How can I let two user controls execute javascript in the onload event?
** Edit: ** Thanks for the information on third-party libraries. I will remember them.
javascript events listener
Ray Aug 13 '08 at 3:18 2008-08-13 03:18
source share