hi, i want to drag the div which have a image in it: but i find that if i click on the image, i cannot drag the div, (in FF3.5) any advice would be appreciated. <div id="div1"> <imc src="XXX.jpg"> </div> Code (markup): and i have a JS something like that...: drag(); function drag(){ document.onmousedown = startdrag; document.onmouseup = enddrag; } function startdrag(e){ dragobj=e.target; alert(dragobj.id); } ...................... Code (markup):
where is your drag targetted? if the drag() is in the <img>, make it refer to this.parentNode instead of this