469,647 Members | 1,800 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

scrollIntoView called on postback


I'm working on an ASP.NET 2 application, with framework 2.0 beta. I have a
classic form, with a listbox. This field is in autopostback=true. When I
change the selected value, the page is reloaded, and the scrollIntoView
function is called at reload. It is called in the Webform_Autofocus(focusId)
function, whose call is included by ASP.NET at page generation. Here is the
code of this function:
function WebForm_AutoFocus(focusId) {
var targetControl;
if (__nonMSDOMBrowser) {
targetControl = document.getElementById(focusId);
else {
targetControl = document.all[focusId];
var focused = targetControl;
if (targetControl != null && (!WebForm_CanFocus(targetControl)) ) {
focused = WebForm_FindFirstFocusableChild(targetControl);
if (focused != null) {
try {
if (window.__smartNav != null) {
window.__smartNav.ae = focused.id;
catch (e) {

The problem is that my form is inside an iframe. And the parent page is
scrolled, in order to put the field in the middle of the window.

Is there any way to disable the call to scrollIntoView after a postback?

Any help will be greatly appreciated !

Nov 19 '05 #1
0 1537

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by bjarthur | last post: by
1 post views Thread by Steve Murphy | last post: by
6 posts views Thread by MooreSmnith | last post: by
1 post views Thread by Jim Satterfield | last post: by
4 posts views Thread by xevi.matavacas | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.