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.
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. function ScrollToRow (idx) { var table = document.getElementById ("myTable"); var top = table.rows[idx].offsetTop; document.body.scrollTop = top; } Code (markup): more info about scrollTop
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.