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
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