scrollBy is not working in IE

M

Michi

Hallo.

I just try to implement a scrolling effect to a drag and drop script.
If you try to drag something to an area beneath the visible area of
your browser window, the window should scroll automatically downwards.
Therefor i defined an area (i.e x-pos = 0px - 200px, y-pos = 500px -
600px), where the page should scroll, if you move the cursor in (while
drag and drop (onmousemove)).
While mousemove i check the coordinates and if they are between the
defined values, then scrollBy should effect.
xpos = window.event.clientX;
ypos = window.event.clientY;
if (xpos < 200 && xpos > 0 && ypos < 600 && ypos > 500)
window.scrollBy(0, 15);

It works great with Firefox (scrolls downwards) but not with IE
(nothing happens).

On page load the page fits into the window and there is no overflow
(and no scrollbar). The overflow appears first when you create some
dynamic content. Could it be that the problem has something to do with
that?

Many thanks for your help and best regards

Mike
 

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
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top