protected void timer1_Tick(object sender, EventArgs e)
{
foreach (RepeaterItem item in rpChat.Items)
{
TextBox txt = item.FindControl
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);