Login Register

drag

Drag and Drop , dynamicly created new iteams, t is undefined

Hello,

Im trying to drag & drop elements dynamically added, but havent been having much sucess,the new elements added by "add item" dont drag and drop properly, could someone please tell me what is wrong with this code?

item = 5;

function additem() {

        document.getElementById("draglist").innerHTML += '<ul class="dojoDndItem" id="' + item + '"><li class="taskdrag dojoDndHandle" id="drag-' + item + '" ><small>drag ' + item + '</small></li></ul>';
        item = item + 1;
}

Drag and Drop , dynamicly created new iteams, t is undefined

Hello,

Im trying to drag & drop elements dynamically added, but havent been having much sucess,the new elements added by "add item" dont drag and drop properly, could someone please tell me what is wrong with this code?

item = 5;

function additem() {

        document.getElementById("draglist").innerHTML += '<ul class="dojoDndItem" id="' + item + '"><li class="taskdrag dojoDndHandle" id="drag-' + item + '" ><small>drag ' + item + '</small></li></ul>';
        item = item + 1;
}

Drag and Drop - Limit new items in container

[editor: moving to the appropriate forum…]

Today I was experimenting with the Drag and Drop functionality and I need some help. I have one container with some items and about 14 other containers without items (all with the dojotype: dojo.dnd.Source).

Now I want to limit the items in the 14 containers to 1, so that only 1 item can be placed in that container. If there is already a item in the container the user should move that first.

I've searched the forums and the tutorials but I couldn't find a way.
Hopefully someone can help me. Thanks in advance.

Wouter

GFX dragging mouse on canvas works strangely on Firefox 2

Hi, I have a simple piece of code:

dojo.require("dojox.gfx");

var containerEl;
var dojoSurface;
var hMouseMoveConnection = null;

function init()
{
containerEl = dojo.byId("canvas");
dojoSurface = dojox.gfx.createSurface(containerEl, 800, 400);

//cancel text selection and text dragging:
//dojo.connect(containerEl, "ondragstart", dojo, "stopEvent");
//dojo.connect(containerEl, "onselectstart", dojo, "stopEvent");

dojo.connect(containerEl, "onmousedown", null, "myHandleCanvasMouseDown");

Drag & Drop - update the value of input elements

Hi,

i have some problems with dojo.dnd. I want to implement the Drag & Drop Funtion with JavaScript, so that the dnd items will be generated dynamicly and i can change the positions of them in the container. And now the problem:

when i include some input elements into the items, change the values and move the items, they wont be updated at the avatar. Why? Can someone help me?

Thanks

The Code

index.html

First Widget
 

Syndicate content