drag and drop replace html

I have this:
<%= drop_receiving_element :slot2, {:onDrop => "function(element) {
$('slot2').replace('<td id = "slot2"> + element + </td>' ).addClassName
('cardfill'); }"} %>

I am trying to replace the data ina table but when I try this it
complains a saying it is looking for a '}' at "slot2"

According to the prototype docs this should be the correct syntax.
Anyone know how to do this?

You need to escape those " in the string :slight_smile: