473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

scrollIntoView called on postback

Hi,

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 {
focused.focus();
focused.scrollIntoView();
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 !

Thanks
Nov 19 '05 #1
0 1691

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bjarthur | last post by:
anyone else had troubles getting scrollIntoView to work in Safari v1.2.4? the sample code below works fine in all other browsers. ben <HTML> <HEAD> </HEAD>
3
by: cmay | last post by:
I am trying to use scrollIntoView to programatically scroll an area on one of my pages. It wors just like you would expect it to when the page itself doesn't have any scrolling (the page is...
1
by: Steve Murphy | last post by:
Do .scrollIntoView, .focus, and .select work in Safari, or am I just doing something wrong. The following code works in Firefox, Netscape, and IE on both Mac and Windows, but fails on Safari: ...
6
by: MooreSmnith | last post by:
When I navigate to the next page using Response.Rediect("MyNextPage.aspx") current page Page_Load event is called. What I may wrongly understood is that post back will happen whenever there is any...
1
by: Jim Satterfield | last post by:
I've looked and looked and can't find any solution or even mention of this problem so I'll see if I can find anyone through this group who might have an idea. I've inherited the job of webmaster...
4
by: xevi.matavacas | last post by:
Hi friends, I found a problem while "scrolling into view" and to overcome this I made a function to simulate javascript's function. I would like to share it and here it is: function...
0
by: Keith | last post by:
I have a web form that contains a repeater control that is designed to ask like a check book register. Clicking on a certain transaction takes the user to a different .aspx page where it can be...
0
by: Keith | last post by:
I have a web form that contains a repeater control that is designed to ask like a check book register. Clicking on a certain transaction takes the user to a different .aspx page where it can be...
3
by: sylver | last post by:
Hi to all, I found out the you can use the scrollIntoView() method, to scroll an element (ie: a <divwith lots of content that it overflows) to its bottom / last line. But this only happens in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.