debbie_walton
10-17-2007, 03:08 AM
1) Script Title: DOM Drag & Drop script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex11/domdrag/
3) Describe problem: the script works fine, however, i'd like to use it on many multiples of an image (a building block). (i'd like to have an undepleatable stack of perhaps 40 or 50 blocks, all absolutely positioned one on top of the other, that can be moved over an architectural grid background to create a floor plan)
what is the easiest way? i don't want to use a separate id for each item if i don't have to, is there a way to combine the following:
<img id="block" src="block.gif" style="position: relative" >
<script type="text/javascript">
Drag.init(document.getElementById("block"));
</script>
<img id="block2" src="block.gif" style="position: relative" >
<script type="text/javascript">
Drag.init(document.getElementById("block2"));
</script>
<img id="block3" src="block.gif" style="position: relative" >
<script type="text/javascript">
Drag.init(document.getElementById("block2"));
</script>
etc, etc,
also, they mention soemthing about on page load, but they don't give an example of how to use this. would the page load method work better for my application?
any help would be GREATLY APPRECIATED!!
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex11/domdrag/
3) Describe problem: the script works fine, however, i'd like to use it on many multiples of an image (a building block). (i'd like to have an undepleatable stack of perhaps 40 or 50 blocks, all absolutely positioned one on top of the other, that can be moved over an architectural grid background to create a floor plan)
what is the easiest way? i don't want to use a separate id for each item if i don't have to, is there a way to combine the following:
<img id="block" src="block.gif" style="position: relative" >
<script type="text/javascript">
Drag.init(document.getElementById("block"));
</script>
<img id="block2" src="block.gif" style="position: relative" >
<script type="text/javascript">
Drag.init(document.getElementById("block2"));
</script>
<img id="block3" src="block.gif" style="position: relative" >
<script type="text/javascript">
Drag.init(document.getElementById("block2"));
</script>
etc, etc,
also, they mention soemthing about on page load, but they don't give an example of how to use this. would the page load method work better for my application?
any help would be GREATLY APPRECIATED!!