Scrolling textarea with JS in Safari

S

simonbc

Hi all,

I'm trying to keep the scrollbar positions of a textarea and a div in
sync. Right now I'm doing that basically by settting div.scrollTop =
textarea.scrollTop every 250 ms. This works fine in FF and IE, but not
in Safari. For some reason the scrollTop property of a textarea seems
always to be zero in Safari.

Is there way to get the position of the scrollbar of a textarea in
Safari? If not, is there another way to keep the scrollbar of a div at
the same position as the scrollbar of a textarea?

Thanks,
Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top