![]() |
|
|
#1
|
|||
|
|||
|
issue regarding scrollbar position
hi
i am facing some problem while setting scrollbar position at run time in a html table. Actually i am having a html table in which no. of row are decided at run time. if at any time on click of any button i need to show any specific row visible on the screen.can anyone help me to find out how much pixel should i down the scroll bar to show any specific position. |
|
#2
|
|||
|
|||
|
You must get the position of your row. If it is not in an absolutly positioned element you can ude the offsetTop property to get its exact position.
Code:
function ScrollToRow (idx) {
var table = document.getElementById ("myTable");
var top = table.rows[idx].offsetTop;
document.body.scrollTop = top;
}
|
|
#3
|
|||
|
|||
|
your java script is not properly saved that why it happens or try again and get the java scrip of scroll bar again that will install the process again it will help you to get less errors.
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| No scrollbar on HTML drop-down? | Dji-man | HTML & Website Design | 25 | May 28th 2008 2:08 pm |
| can someone explain Adword's average position system | wingdude | Google AdWords | 25 | Mar 24th 2006 12:14 am |
| Slow invoice/credit issue | geokill | Optigold ISP | 5 | May 3rd 2005 10:05 am |
| Does AdSense ads depends on position? | Tuning | AdSense | 4 | Mar 13th 2005 10:03 am |
| deeplinks less risky than root links? | Dirkjan | Link Development | 4 | Oct 26th 2004 1:54 am |