Forum Moderators: open

Message Too Old, No Replies

browser scrollbar 'defect'

         

simonB

11:03 am on Mar 21, 2004 (gmt 0)



I have a table in my page with many rows hidden (display:none).

On user actions, the rows are revealed (.style.display = 'inline')

As the rows are displayed, the table extends off the bottom of the viewable area of the page/window.

The problem is that the browser scrollbar does not extend to accommodate the new length of the page, so the user cannot scroll down to view the 'new' content.

I have tried :

if(document.body.offsetHeight < n.offsetHeight){document.body.height = n.offsetHeight};

..... but that doesn't seem to 'refresh' the scrollbar scale either.

I have some dirty ways around this, but they are dirty and i'd rather do this the 'right' way!

Hope someone can help?

Rambo Tribble

2:00 pm on Mar 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure it will affect your problem, but I believe display:block is more appropriate for a table.