[Dojo-interest] Re:help needed for dnd

Thomas Wolf tw at wsf.at
Mon Feb 12 07:21:43 MST 2007

sonal kohok wrote:
> Hey Thomas,
>   Thanks.. It worked gr88.
>    But I want help in one more thing. On the same page that i had given
> u, at the top most right hand side I have a trash can. I should b able
> to delete the images on right hand side by just dragging them onto the
> trash icon/image. Is it possible, if not please suggest me the better
> way to do it. U already have my code. So please help me. Bye TC.

My approach was to add
<img id="trash" src="images/trash.png">
to the markup and put:

var trash=new dojo.dnd.HtmlDropTarget(dojo.byId("trash"), ["*"]);
trash.insert=function(e) {

at the end of the addOnLoad function.
Tested at http://www.wsf.at/test/dndie.html


More information about the Dojo-interest mailing list