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

document.body.scrollTop for an "autoscroll: auto" css element

Hi, I'm putting together a little database of individuals categorized
by family. I have two lists, one that contains family names and one
that contains individuals' names. When you click on a link in the first
list, it generates from a mysql database all the people associated with
that family. When you click on an individual's name, it displays
biographical information.

The catch is, for space, I've put these lists in little boxes defined
by width, height, and the "autoscroll: auto" feature in css. When I
click a family name, it refreshes the page to load all the individuals,
and I lose how far down in the family box I scrolled. In other words,
if I choose "Whitman," the page refreshes and I see all the Whitman
family members in the right (individuals) box, but the left (family)
box scrolls back up to the top to display Alexander, Bartlett, Bishop,
etc.

I was reading about document.body.scrollTop, but my experiments haven't
allowed me to apply this to a scrolling element within the page such as
my families box. Does anyone have any suggestions? I tried things like
document.bio1.scrollTop (where bio1 is the id of my families box), but
that didn't do anything. It's not the biggest problem in the world, but
it would be really cool if I could get it working somehow.

Thanks,
Alexandra

Jul 29 '06 #1
1 4030
Sorry, I misspoke. My block elements use the "overflow: auto" tag, not
"autoscroll: auto"
Je********@gmail.com wrote:
Hi, I'm putting together a little database of individuals categorized
by family. I have two lists, one that contains family names and one
that contains individuals' names. When you click on a link in the first
list, it generates from a mysql database all the people associated with
that family. When you click on an individual's name, it displays
biographical information.

The catch is, for space, I've put these lists in little boxes defined
by width, height, and the "autoscroll: auto" feature in css. When I
click a family name, it refreshes the page to load all the individuals,
and I lose how far down in the family box I scrolled. In other words,
if I choose "Whitman," the page refreshes and I see all the Whitman
family members in the right (individuals) box, but the left (family)
box scrolls back up to the top to display Alexander, Bartlett, Bishop,
etc.

I was reading about document.body.scrollTop, but my experiments haven't
allowed me to apply this to a scrolling element within the page such as
my families box. Does anyone have any suggestions? I tried things like
document.bio1.scrollTop (where bio1 is the id of my families box), but
that didn't do anything. It's not the biggest problem in the world, but
it would be really cool if I could get it working somehow.

Thanks,
Alexandra
Jul 29 '06 #2

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

Similar topics

2
by: Vern | last post by:
Hi All, I'm looking for a script which monitors each keystroke in an input text field and compares it to the contents of an array of strings and displays the first matching element as the user...
16
by: John Baker | last post by:
Hi: I know this is a strange question, but I have inherited a system where files are copied and records re auto numbered (as an index field) )frequently, and I am wondering how high the number...
1
by: John | last post by:
I'm trying to use the DrawText() method to draw some very long string text on the Panel with AutoScroll enabled. However, for some unknown reasons, I could not trigger the ScrollBar to show up. ...
1
by: PL | last post by:
The Culture="auto" UICulture="auto" is a great idea, but how do you handle the situaion where SQL Server always requires a dot "." in numeric values. If I use Culture="auto"so that dates and...
3
by: Tom Bianchi | last post by:
Hi, I have a Panel with the AutoScroll property set to True and many TextBoxes into it, with only some of them positioned in the visible portion of the panel. Is there a Panel event that I can...
9
by: Beowulf | last post by:
I was having this problem: http://groups.google.com/group/microsoft.public.sqlserver.server/msg/e36e423972323378?dmode=source with it taking an inordinate amount of time to enumerate the...
22
by: nospam_news | last post by:
I currently get asked about my usage of "auto". What is it for? The keyword is clearly superflous here. In contrast to the huge majority of C/C++ developers I write definitions very explicitly...
2
by: Piotr K | last post by:
Hi, I've encountered a strange problem with Firefox which I don't have any idea how to resolve. To the point: I've <divelement with a style "height: auto" and I want to retrieve this value...
1
by: mattmao | last post by:
I am doing a ASP.NET porject, inside a asp control tag there are some textboxes for users to input data. Later they can take previously entered data out of those textboxes. To provide better UI...
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
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...
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
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.