Hello
I have a page that is ajaxed using Ajax Manager. There is a RadWindow on the page which uses navigateurl rather than contenttemplate to show a page within the site (so not an external URL)
That page also has AjaxManager on it. When an ajaxed field within the window is changed the page does a partial postback correctly (and updates whatever it needs to do on itself) however the scroll position of the parent page scrolls to the top.
How do I stop that from happening?
I note that I am using this to scroll back to the window on window load because on opening the window it would scroll to the top as well
function fnRadWindowPageLoad() {
if (modalPopUpScrollPositionObj != null)
window.scrollTo(modalPopUpScrollPositionObj.XCoordinate(), modalPopUpScrollPositionObj.YCoordinate());
}
I'm using this to open the window in the code behind, after I've done some processing
Dim sbScript As New System.Text.StringBuilder()'This needs the Sys.Application.Load event, as the button performs a full postback, thus disposes the entire user control, as well as the page
sbScript.Append("function f(){")
sbScript.Append("var oWnd = $find('" & RadWindowSearchFilter.ClientID & "');")
sbScript.Append("oWnd.show();")
sbScript.Append("Sys.Application.remove_load(f);")
sbScript.Append("}")
sbScript.Append("Sys.Application.add_load(f);")
ScriptManager.RegisterStartupScript(Page, Me.GetType(), "key", sbScript.ToString(), True)