473,387 Members | 1,423 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,387 software developers and data experts.

Browser flicks to top of page on post back

On a post back, Internet Explorer flicks the page to the top. E.g. when
scrolling down the page to edit a text box the user clicks a button to
validate the value. This causes a post back. IE then reloads the page but
flicks it back up to the top. The user than has to scroll back down to where
they were.

Is there any way to overcome this behaviour but still use post back?

Thanks.

--
McGeeky
http://mcgeeky.blogspot.com

May 4 '06 #1
4 1776
You can turn on smart navigation on the page. However, that has been known
to cause side effects, so just a warning.

"McGeeky" <an**@anon.com> wrote in message
news:OZ**************@TK2MSFTNGP03.phx.gbl...
On a post back, Internet Explorer flicks the page to the top. E.g. when
scrolling down the page to edit a text box the user clicks a button to
validate the value. This causes a post back. IE then reloads the page but
flicks it back up to the top. The user than has to scroll back down to
where they were.

Is there any way to overcome this behaviour but still use post back?

Thanks.

--
McGeeky
http://mcgeeky.blogspot.com

May 4 '06 #2
"McGeeky" <an**@anon.com> wrote in message
news:OZ**************@TK2MSFTNGP03.phx.gbl...
On a post back, Internet Explorer flicks the page to the top. E.g. when
scrolling down the page to edit a text box the user clicks a button to
validate the value. This causes a post back. IE then reloads the page but
flicks it back up to the top. The user than has to scroll back down to
where they were.

Is there any way to overcome this behaviour but still use post back?


Presumably your causing a postback because the contents of the textbox need
to be evaluated server-side e.g. maybe against a database etc...? If so,
then you have several options:

1) Use SmartNavigation - can sometimes have unpredictable results...

2) Use Ajax - probably a sledgehammer to crack a nut...

3) Set the focus to the textbox at the very end of the validation routine -
very easy...
May 4 '06 #3
On Thu, 4 May 2006 12:29:45 +0100, "McGeeky" <an**@anon.com> wrote:
On a post back, Internet Explorer flicks the page to the top. E.g. when
scrolling down the page to edit a text box the user clicks a button to
validate the value. This causes a post back. IE then reloads the page but
flicks it back up to the top. The user than has to scroll back down to where
they were.

Is there any way to overcome this behaviour but still use post back?

Thanks.


If you're using ASP.NET 2.0, you should use MaintainScrollPosition.

Jim Cheshire
Blog: http://blogs.msdn.com/jamesche

May 4 '06 #4
Thank you very much for all of your replies. Much appreciated!

--
McGeeky
http://mcgeeky.blogspot.com
"Jim Cheshire" <ji*@jimcosoftware.com> wrote in message
news:57********************************@4ax.com...
On Thu, 4 May 2006 12:29:45 +0100, "McGeeky" <an**@anon.com> wrote:
On a post back, Internet Explorer flicks the page to the top. E.g. when
scrolling down the page to edit a text box the user clicks a button to
validate the value. This causes a post back. IE then reloads the page but
flicks it back up to the top. The user than has to scroll back down to wherethey were.

Is there any way to overcome this behaviour but still use post back?

Thanks.


If you're using ASP.NET 2.0, you should use MaintainScrollPosition.

Jim Cheshire
Blog: http://blogs.msdn.com/jamesche

May 4 '06 #5

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

Similar topics

8
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
3
by: Bernd Kohler | last post by:
Hello, I got an annoying problem using the POST-method to send a form's data: I put a login-form on the page which is sent by the POST-method to itself. After that the content of the...
3
by: Rob | last post by:
Each time a webform is posted back (submitted), another URL is added to the browser's history list. My web application allows a back button to return to previously visited pages, but I do not wish...
0
by: Matthew Thompson | last post by:
I'm having a bit of difficulty with Flicks Software's Authentix software on a web site I am devloping with ASP.NET in C#. I am using cookie based authentication and the setup is redirecting the...
4
by: interuser | last post by:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="pagexxx.aspx.vb" Inherits="pagexxx"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- #include...
2
by: junlia | last post by:
Hi All, I am working on a project that acts as a bridge. It does some checking with post xml data, and then redirects the request to an appropriate page. However, we find that depends on the...
3
by: Rosanne | last post by:
Is there a way to clear the SelectedIndex of a listbox when the browser's back button is clicked? I have a page that contains a server side list box with AutoPostBack = True. When the user...
15
by: tshad | last post by:
I was looking for a way to handle refreshes (user pressed refresh button) and found a piece of code to check if a Web page was refreshed but I can't get it to work. The code is:...
6
by: hemant.singh | last post by:
Hi all, I am trying to get a way by which I'll know exactly when user goes out of my site by clicking on close button in browser, So that w/e user click close button in browser, I can send a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.