There are several issues with your code.
First of all, you're using data.seq
, data.name
, data.form
, ... in the forEach()
loop. However, I suppose you want to use item.seq
, item.name
, item.form
, ... in stead of that.
Then the second issue, you're missing a bracket at the end of your code, closing the forEach()
loop. I suppose this part of the code is at the .....
, but I cannot be sure of that.
The third issue is that the draggable items inside a dojo/dnd/Source
should have the classname dojoDndItem
. None of your <div>
's have that class, so none of them are draggable.
Another issue is that you're not adding the HTML inside cont
to a DOM node, so it's never getting displayed. I suppose that part of the code is at the .....
, but just like the other issue I can't be sure of it.
Then the last issue is that you have to parse your content by the Dojo parser to make it work. You can do that by using:
parser.parse(domNode);
Where domNode
is the node that is being used to add the HTML string to it.
I edited your code and this is the result: http://jsfiddle.net/n7MxD/