Hi tech savvy friends!
I am trying to use a javascript code I found online that enables a table to autoscroll. I want to use this to showcase a list of supporters of our organization (using Caspio's Gallery Report), and I need this function because 1) caspio only allows 999 records to be display in the tabular report, and 2) I don't want viewers to have to click through the pages to show the rest of the records.
The javascript I found is this:
<script>
var my_time;
$(document).ready(function() {
pageScroll();
$("#contain").mouseover(function() {
clearTimeout(my_time);
}).mouseout(function() {
pageScroll();
});
});
function pageScroll() {
var objDiv = document.getElementById("contain");
objDiv.scrollTop = objDiv.scrollTop + 1;
$('p:nth-of-type(1)').html('scrollTop : '+ objDiv.scrollTop);
$('p:nth-of-type(2)').html('scrollHeight : ' + objDiv.scrollHeight);
if (objDiv.scrollTop == (objDiv.scrollHeight - 100)) {
objDiv.scrollTop = 0;
}
my_time = setTimeout('pageScroll()', 25);
}
</script>
I am sure the code, as is, is not calling elements in Caspio, if I knew more coding (or had more time to look into it) I would try to mess with it. So, instead I am hoping one of you out there can help me out, please! I found this code here: https://codepen.io/salman31/pen/dYdGLa/
I would greatly appreciate your help with this. Thank you!!!