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

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.