Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Reposition to area of screen after page is submitted ..

Posted on 2011-03-17
2
Medium Priority
?
270 Views
Last Modified: 2012-05-11
Hey all.

I have a situation where I need to focus on an element after the page is submitted but for it to be "smooth".

I have a screen with table data on it, the table has, say, 100 records that cause the page to scroll. An item near the bottom of the page is updated and once it is updated, the page is automatically submitted (refreshed), there's no way around the submittal of the page.

Once the page "comes back", I need for that same element to have focus and for it to happen smoothly. Currently, once the page is reloaded, it is at the top of the page and when I reposition down the page, you can see the page "move down". So, what you have is the page having to load and then visibly "move down" to the focused element. I want to eliminate the viewing of the "moving down" part.

Also, centering the focused element would be nice too, or at least moving it up from the bottom edge of the screen.

Any ideas?
0
Comment
Question by:Webspeeder
2 Comments
 
LVL 8

Accepted Solution

by:
dmeeren earned 2000 total points
ID: 35160209
Why not use <a name="positionname"></a> and ad the following to the refresh link #positionname, you will get a link like: http://domain.com/bla.php#positionname
0
 

Author Comment

by:Webspeeder
ID: 35161165
I thought about that but figured it would have same visual affect. I'll try it.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question