tags:

views:

12

answers:

1

Hi I want to set the position of anew div box relative to the position of the comments box on my form. I can position the div but am struggling to get the value of the text box. I was thinking this would work but it doesn't

pos = document.getElementById('comments').style.top.value 

any help please ?

A: 

Try

pos = document.getElementById('comments').offsetTop

Andrew67