Hi
This script works in FF but not in IE7. The error occures with
element.remove() in the onDrop callback function. I already found out,
that if element is a <div> instead of a <img> element it works in both
browsers.
Any help is greatly appreciated.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>
  <style type="text/css">
   div.pinkSquare { border:5px solid pink;}
   div.orangeSquare {border:5px solid orange;}
   div.greenSquare {background-color:green; width: 25px; height:
25px;}
   div.anySquare {width: 50px; height: 50px; }
  </style>

 <script language="JavaScript" type="text/javascript" src="../js/
scriptaculous-js-1.8.2/lib/prototype.js"></script>
 <script language="JavaScript" type="text/javascript" src="../js/
scriptaculous-js-1.8.2/src/scriptaculous.js"></script>
 <script language="JavaScript" type="text/javascript">
 init=function(){
  var square=new Element('img',
{'id':'square','class':'greenSquare',src:'../pieceGif/Q.gif'});
  $('a8').insert(square);
  Droppables.add("b8", { accept: 'greenSquare', onDrop: function
(element){element.remove();}});
  new Draggable('square');
}
 </script>

</head>

<body onload=init()>
   <div id="a8" class="anySquare pinkSquare"></div>
   <div id="b8" class="anySquare orangeSquare"></div>
</body>

</html>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to