Link to home
Start Free TrialLog in
Avatar of Alpita
Alpita

asked on

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
Avatar of davas
davas

sory i dont know
Avatar of Alpita

ASKER

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
Avatar of Alpita

ASKER

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.
you want focus in the table or in the cell of the table.any how send the HTML code.
ASKER CERTIFIED SOLUTION
Avatar of Alpita
Alpita

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alpita

ASKER

Found the solutin.