Hi,
I am having the following problem:
I need to show a confirm alert whenever the users moves a tree node from one place to another (something like “Are you sure do you want to move the node? yes/no”).
I am using the onDrag to add my validation:
tree2.attachEvent(“onDrag”, function(sId,tId,id,sObject,tObject) {
return validateMove(sId, tId);
});
My function for validating is something like this:
function validateMove(sId, tId) {
var flag = allowedToMove(sId, tId);
if(flag){
flag = confirm("Do you want to move " + tree2.getItemText(sId) + “?”);
}else{
alert(“Moving " +tree2.getItemText(sId)+ " is not allowed due to specific rule!”);
}
return flag;
}
The problem is that when the confirm appears and the users clicks on cancel. The layout becomes corrupt like I show in the image. (see that the black line that appears while holding the mouse click still remains).
Anyone has an idea of how to solve this?
Thanks in advance