Jump to content

Autoscrolling for this drag and drop script?


Guardian-Mage

Recommended Posts

I am a PHP programming, and not a Javascript One(Yet). For this project I am using someone's Else's script that I have streamlined a bit. I want it so I can drag a picture from the top to the bottom and for that I need it to auto scroll. Does anyone have any insights into how I might to this:

 

http://cdlandscaping.biz/dev2/test/sorting.html

This code works well at scrolling a page, any idea how to implement it how I want? And direction or advice? It is appreciated :)

 

<html>
<head>
<script type="text/javascript">
function scrollWindow(inc) {
	speed=100;
	newinc=inc+20;
	t=setTimeout("scrollWindow(newinc)",speed);
	window.scrollTo(0,inc);
}

</script>
</head>

<body onLoad="javascript:scrollWindow(20);">
<?php 
	$i=0;
	while ($i < 1000) {
		echo "I AM LINE NUMBER $i<br />";
		$i++;
	}
    ?>
</body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.