In the following javascript, the scrollX and scrollY are always zeros althought I clicked a radio button at the bottom of the form. I found on the internet that one person changed HTML 4.0 to 3.2 in <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> and took care of the problem. I tried but still got zeros. Any idea? Thanks. function SmartScroller_GetCoords() { var scrollX, scrollY; if (document.all) { if (!document.documentElement.scrollLeft) { scrollX = document.body.scrollLeft; } else { scrollX = document.documentElement.scrollLeft; } if (!document.documentElement.scrollTop) { scrollY = document.body.scrollTop; } else { scrollY = document.documentElement.scrollTop; } } else { scrollX = window.pageXOffset; scrollY = window.pageYOffset; } document.Form1.scrollLeft.value = scrollX; document.Form1.scrollTop.value = scrollY; confirm(scrollX); confirm(scrollY); } DanYeung