Seeking help as I am unsure how to tackle this task. My project involves using asp.net, where I have a div that has overflow:auto enabled to display terms and agreements. Additionally, there is an asp.net checkbox control with visibility set to "false". I want the checkbox to become visible only when the user scrolls all the way to the bottom of the div. I attempted to implement a Javascript function triggered by onmouseup, but it doesn't seem to be functioning correctly. I'm struggling to figure out how to change the checkbox's visibility to "true" through JavaScript code.
function checkScrollPosition(elem) {
if(elem.scrollHeight<(elem.scrollTop+elem.offsetHeight)) {
document.getElementById("CheckBox1").style.visibility = "visible";
}