Hola infoturnosya
Este es el código. Yo quiero que cuando este mal salga un mensaje.
Otra pregunta por que en IE este código no me funciona. Como debo ponerlo?
Código Javascript
:
Ver original<script type="text/javascript">
function dropItems(idOfDraggedItem,targetId,x,y)
{
var targetObj = document.getElementById(targetId);
var subDivs = targetObj.getElementsByTagName('DIV');
if(subDivs.length>0 && targetId!='piezas')return;
var sourceObj = document.getElementById(idOfDraggedItem);
var numericIdTarget = targetId.replace(/[^0-9]/gi,'')/1;
var numericIdSource = idOfDraggedItem.replace(/[^0-9]/gi,'')/1;
if(numericIdTarget-numericIdSource==100){
sourceObj.style.WebkitFilter= 'drop-shadow(6px 6px 25px rgba(163,255,15,0.5))';
sourceObj.style.filter= 'drop-shadow(6px 6px 25px rgba(163,255,15,0.5))';
sourceObj.style.msFilter= 'progid:DXImageTransform.Microsoft.MotionBlur(strength=50), progid:DXImageTransform.Microsoft.BasicImage(mirror=1)';
}else{
sourceObj.style.WebkitFilter= 'drop-shadow(6px 6px 25px rgba(255,0,0,0.5))';
sourceObj.style.filter= 'drop-shadow(6px 6px 25px rgba(255,0,0,0.5))';
}
if(targetId=='piezas'){
targetObj = targetObj.getElementsByTagName('DIV')[0];
sourceObj.style.webkitFilter= 'drop-shadow(0px 0px 0px rgba(0,0,0,0.0))';
}
targetObj.appendChild(sourceObj);
}
var dragDropObj = new DHTMLgoodies_dragDrop();
dragDropObj.addSource('box1',true);
dragDropObj.addSource('box2',true);
dragDropObj.addSource('box3',true);
dragDropObj.addTarget('box101','dropItems');
dragDropObj.addTarget('box102','dropItems');
dragDropObj.addTarget('box103','dropItems');
dragDropObj.addTarget('piezas','dropItems');
dragDropObj.init();
</script>
Código Javascript
:
Ver originalsourceObj.style.msFilter= 'progid:DXImageTransform.Microsoft.MotionBlur(strength=50), progid:DXImageTransform.Microsoft.BasicImage(mirror=1)';
Gracias por tu ayuda