uxair
01-05-2007, 06:19 AM
I've a div which contains loads of data inside a table, I want to do some loading when onscroll of DIV fires.
This is fine fine but the problem is when user scroll through mousewheel multiple onscroll events are fired so what I want is to first check if multiple events r in the stack remove them from the stack and do the loading stuff only once, here is the code
<script language="javascript">
function LoadData()
{
//Here I would check that multiple event thing
// and after this load the data
getCustomersRiskDetail( document.getElementById( "tbleExposure" ), 1 );
}
</script>
<DIV id="divExposure" style="BORDER-RIGHT: #9999ff thin ridge; BORDER-TOP: #9999ff thin ridge; OVERFLOW-Y: scroll; BORDER-LEFT: #9999ff thin ridge; WIDTH: 1104px; BORDER-BOTTOM: #9999ff thin ridge; HEIGHT: 544px"
align="center" onscroll = "LoadData()">
</DIV>
This is fine fine but the problem is when user scroll through mousewheel multiple onscroll events are fired so what I want is to first check if multiple events r in the stack remove them from the stack and do the loading stuff only once, here is the code
<script language="javascript">
function LoadData()
{
//Here I would check that multiple event thing
// and after this load the data
getCustomersRiskDetail( document.getElementById( "tbleExposure" ), 1 );
}
</script>
<DIV id="divExposure" style="BORDER-RIGHT: #9999ff thin ridge; BORDER-TOP: #9999ff thin ridge; OVERFLOW-Y: scroll; BORDER-LEFT: #9999ff thin ridge; WIDTH: 1104px; BORDER-BOTTOM: #9999ff thin ridge; HEIGHT: 544px"
align="center" onscroll = "LoadData()">
</DIV>