detecting mouse wheel

Hi Sir,

I would like to know if there is a way to detect mouse wheel within the page? I want to do the page like this forum which dynamically adds another row upon reaching the last row message.

Having not tried xojo web yet, your mileage may vary:

https://www.w3schools.com/jsref/event_onwheel.asp

However, I believe this is performed by scroll position and not mouse wheel related.

See https://code.tutsplus.com/tutorials/how-to-create-infinite-scroll-pagination--wp-24873 for more information.

Indeed Mousewheel will not help. What he really needs is scrollposition but that does not exist in Xojo Web. It would require detecting the position of the Webpage.

I think this could be used :
https://www.w3schools.com/jsref/prop_element_offsettop.asp

Its been a while since I did any javascript, I just hacked this together from some w3schools examples, it could use a little clean up but here’s a quick example:

[code]

#myDIV { height: 250px; width: 250px; overflow: auto; }

#content {
height: 800px;
width: 2000px;
background-color: coral;
}

Scroll test

Test content

Test content

Test content

Test content

Test content

Test content

Test content

Test content

Test content

Test content

[/code]

You can detect scrolls on containerControls, so just put one that fills the entire page.