Creating a source/target in Dojo

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Oct 2007
Posts: 39
Reputation: Tom Tolleson is an unknown quantity at this point 
Solved Threads: 0
Tom Tolleson's Avatar
Tom Tolleson Tom Tolleson is offline Offline
Light Poster

Creating a source/target in Dojo

 
0
  #1
Oct 27th, 2008
Hello.

I've got a page with a <div> that is a dojo.dnd.source and another <div> that is a dojo.dnd.target. I am able to drag objects from the source to the target successfully, but I would like to be able to drag them back again as well.

Any advice on this?

<div dojoType="dojo.dnd.Source" jsId="c1" class="source">
<img src="app_1.png" class="dojoDndItem" dndType="blue"/>
<br>

<img src="app_2.png" class="dojoDndItem" dndType="red"/>
</div>



<div dojoType="dojo.dnd.Target" jsId="c2" class="target" accept="red,blue">
</div>

Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 1
Reputation: jamespw is an unknown quantity at this point 
Solved Threads: 0
jamespw jamespw is offline Offline
Newbie Poster

Re: Creating a source/target in Dojo

 
0
  #2
Dec 27th, 2008
Make them both dojo.dnd.Source objects, and give them both the attribute accept="red,blue".
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 801 | Replies: 1
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC