469,366 Members | 2,342 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

CSS Scroll Position After Javascript "reload()"

Hi,

I have an application screen with a CSS scroll area. Users click links
in the scroll area which open small popup windows to enter data. When
the data is submitted, the popup reloads the opener to update the page
and closes itself. However when the parent page is updated, the div
scrolls back to the top. Is there a way to have CSS remember the
vertical scroll position and go back to it when the page is reloaded?
Similar to document.body.scrollTop in Javascript. Here's the relevant
portion of the code:

<STYLE TYPE="text/css">
div.scroll
{
height: 400px;
width: 960px;
overflow: auto;
border: 1px solid #0000ff;
background-color: #77ddcc;
padding: 8px;
}
</STYLE>

.............

<div class="scroll">
...application data...
...application data...
...application data...
...application data...
</div>

Oct 27 '06 #1
1 3592
ASM
Raffi a écrit :
Hi,

I have an application screen with a CSS scroll area. Users click links
in the scroll area which open small popup windows to enter data. When
the data is submitted, the popup reloads the opener to update the page
and closes itself. However when the parent page is updated, the div
scrolls back to the top. Is there a way to have CSS remember the
vertical scroll position and go back to it when the page is reloaded?
Similar to document.body.scrollTop in Javascript. Here's the relevant
portion of the code:
it is a simple question of html and answer is : use anchors

when calling popup send to it the id of link pressed
then when popup calls the new page in its mother the location mentions
anchor (the precedent id) to reach

opener.location = 'balh.htm#' + id;

Oct 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Ante Perkovic | last post: by
4 posts views Thread by Larry R Harrison Jr | last post: by
5 posts views Thread by AES/newspost | last post: by
3 posts views Thread by NuB | last post: by
3 posts views Thread by Aaron | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.