How i can focus to current table in jsp

Hello experts,
In my jsp page, initially all tables are hidden. When clicked, those tables will get show.
The issue is, when a particular table is shown, the scroll bar is not focusing to the corresponding table. Instead it is focusing to the top of the page.

I used document.getElementById(tabId).focus();  in showHide() function of my code. But still it is not focusing to the table .

Please any ideas?

Myjsp.txt
AlpitaAsked:
Who is Participating?

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

x
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.

davasCommented:
sory i dont know
AlpitaAuthor Commented:
I simplified the question. I have attached a simple html page which has 8 div tags.
Lets say I clicked on div 8. it collapses. But it shows me the top of the page. Again I have to scroll down to see the collapsed div 8. If I click it (div 8) again, it will be expanded and automatically scroll to top of the page. I have to again scroll all the way down to see div 8.

I tried several ways such as scrollToView(true), divX.scrollTop=0.

My plat form is IE7 on Windows XP.

Could you provide any solution for this issue. Myjsp.html
AlpitaAuthor Commented:
Could some one look into this problem. I made it easy to understand. You can download the attached html and see the issue on you system itself.

Waiting for your quick reply.
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

chaitu chaituCommented:
you want focus in the table or in the cell of the table.any how send the HTML code.
AlpitaAuthor Commented:
I already attched my code in my previous comment.
I found the solution for my issue.
Need to add the statement "return false;" in <a> </a>.
Like this:
<a href="#" onClick="showHide('div2',2);return false;">div2</a>

Thanks,
Alpita

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
AlpitaAuthor Commented:
Found the solutin.
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
Scripting Languages

From novice to tech pro — start learning today.