Scrollable Table: Jump to anchor

I plan to use the code on the following page to create a table where the content is scrollable but the header and footer are static.

However, I would like to create one or more links to anchors (or rows with ids) within the table which would allow users to 'jump' to a specific row - ie the table would scroll so that the required row is shown at the top of the scrollable area.

I'm guessing that this can't be done with HTML and CSS, so what would I need to do in terms of javascript?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I am not sure the section technique is usable in this case, but worth you a try.

This link points to a certain section in the same html and allow jumping when clicking the link
<a href="#C4">Go to cell 4</a>
<h2><a name="C4">cell 4</a></h2>
<p>This chapter explains ba bla bla</p>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GarveAuthor Commented:
No, that would work if the table wasn't scrollable, but not here.

I guess what I'm doing might be better explained like this.

It's equivalent to having a div of a specific height set to overflow:auto; where I want to be able to scroll the contents of the div to a specific point.

Using an anchor as you suggest would scroll the whole page to a specific point, not just the div.
David H.H.LeeCommented:
Hi Garve,
quincydude's solution is work for your preferred anchor that set in any places in your web site.
Here i modify one of the cell that named "cell1" inside the scrollable table that provided in link. It is still working fine. You need to set the anchor's id as you need first. Please provide more details you trying to archieve something else there.
GarveAuthor Commented:
Thanks - I had placed my anchor like this

<a name="jump"></a>

but if placed within the cell it works.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.