markrobertshaw
23 May 2008, 5:46 AM
Hi There
Try as I might I can't seem to get drag and drop to work in my Air / Ext-JS application. I have copied the code from the Simple Tasks example (i.e. adding an on drop event to the body of one of my panels) using a simple alert function as the handler. When I attempt to drag a file or a piece of text onto the panel in question I get nothing (and no errors on the console either). It's as if the event is not registered. I have tried the following permutations to no avail.
1) Simple Tasks way
panel.body.on ("drop", function(e){
alert("Boo");
});
2) Manual Dom way
document.getElementById("mypanel").addEventListener("drop", function(e){
alert("Boo");
});
or document.getElementById("mypanel").ondrop = function(e){
alert("Boo");
}
Any suggestions as to how I can get drag and drop to fire correctly for a panel?
Thanks
Mark
Try as I might I can't seem to get drag and drop to work in my Air / Ext-JS application. I have copied the code from the Simple Tasks example (i.e. adding an on drop event to the body of one of my panels) using a simple alert function as the handler. When I attempt to drag a file or a piece of text onto the panel in question I get nothing (and no errors on the console either). It's as if the event is not registered. I have tried the following permutations to no avail.
1) Simple Tasks way
panel.body.on ("drop", function(e){
alert("Boo");
});
2) Manual Dom way
document.getElementById("mypanel").addEventListener("drop", function(e){
alert("Boo");
});
or document.getElementById("mypanel").ondrop = function(e){
alert("Boo");
}
Any suggestions as to how I can get drag and drop to fire correctly for a panel?
Thanks
Mark