J query

Javascript to set a focus in update panel

  Add Below js file in your project var lastFocusedControlId = “”; function focusHandler(e) { document.activeElement = e.originalTarg et; } function appInit() { if (typeof(window.addEventListener) !== “undefined”) { window.addEvent Listener(“focus”, focusHandler, true); } Sys.WebForms.PageRequestManager.getInstance().add_pageLo ading(pageLoadingHandler); Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoade dHandler); } function pageLoadingHandler(sender, args) { lastFocusedControlId = typeof(document.a ctiveElement) === “undefined” ? “” : document.activeElement.id; } function focusControl(targetConContinue Reading “Javascript to set a focus in update panel”