DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Drag And Drop Image With Javascript

07.27.2005
| 22037 views |
  • submit to reddit
        
<body>
<script src="http://www.walterzorn.com/scripts/wz_dragdrop.js"></script>

<img name="name1" src="someImg.jpg" width=240 height=135>

<script>SET_DHTML("name1")</script>
</body>
You can make the image resizable (using shift-drag) by
SET_DHTML("name1"+RESIZABLE) // any size
SET_DHTML("name1"+SCALABLE) // keep aspect ratio
See more detail here
http://www.walterzorn.com/dragdrop/dragdrop_e.htm