I'm not sure what value you are trying to get. Are you trying to get the scroll position of the body? The position in relation to the body of chatedit
?
To get the body scroll position, you would use:
document.body.scrollTop
To get the position of the chatedit
element, I'd suggest using jQuery:
$('#chatedit').offset().top
If you're trying to see where it sits in relation to the viewport, you would merge the two:
$('#chatedit').offset().top - document.body.scrollTop