When you use an UpdatePanel, then you can not call JavaScript using ClientScript as you have tried to. You have to use ScriptManager.RegisterStartupScript
instead.
So change your
Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", javaScript);
to
ScriptManager.RegisterStartupScript(updatePanelId,updatePanelId.GetType(), "alert", javaScript, true);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…