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

J

Jefferds.A

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
 
J

Jefferds.A

Sorry, I misspoke. My block elements use the "overflow: auto" tag, not
"autoscroll: auto"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top