WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 scrolling a table to a specific row, Darren, November 17, 2003
     Re:scrolling a table to a specific row, Darren, November 17, 2003

Subject: Re:scrolling a table to a specific row From: Darren Date: November 17, 2003
Looks like if you do the following it works pretty well (pretend table has an id="tab" on it)

     var div = document.getElementById('scrollingDiv');
  var aTable = document.getElementById('tab');
  div.scrollTop = table.rows[n].offsetTop;

Does anyone know if scrollTop and offsetTop have any cross-browser issues?

- Darren.

From: Darren
Sent: November 17, 2003
Subject: Re:scrolling a table to a specific row

Greetings,

I have a table in a div something alone the lines of:

<div style="overflow:auto;height:200" id="scrollingDiv">
   <table>...table content here </table>
</div>

I need a mechanism whereby I can scroll to a specific row
in the table (make it the first one visible if possible), or at the
very least ensure that a specific row is visible.

Thanks in advance for the help

- Darren






Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX