I have a small div box that has a vertical scrollbar and is inside an html page that also has a vertical scrollbar.
My problem is when the user reaches the end of the small scroll in the DIV window, the ENTIRE html page containing the div field then starts to scroll (provided that the user scrolls by scrolling the mouse and NOT, actually pressing the DIV button the scroll buttons themselves)
Is there a way to prevent the entire html page from scrolling after the user reaches the end of my little scroll in the DIV window? Any help is appreciated! Thank!
I tried this (but it cancels the scroll even for the div field):
if (window.addEventListener)
window.addEventListener('DOMMouseScroll', handleWheelEvent, false);
window.onmousewheel = document.onmousewheel = handleWheelEvent;
function handleWheelEvent(e){
e.preventDefault();
}