Yep, it was a timing issue. Using a timeout of 0 seconds (!) solved it...
setTimeout("document.getElementById('divName').scrollTop = document.formName.nameCoOrd.value", 0);
Thanks for your help!!
A little help please...
I have a <div> (let's call it divName), and I want to store its scroll position in a hidden variable (let's call it nameCoOrd). I store its scroll position using:
document.formName.nameCoOrd.value = document.getElementById('divName').scrollTop;
This seems to work...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.