hi to all expert

How can i drag an item when using DOM , so far I am receiving an error
in prototype.js line 1903 "element is null"


here is my simple code



<script type="text/javascript"
        src="javascript/prototype.js"></script>
<script type="text/javascript"
        src="javascript/scriptaculous.js"></script>

<script>
function imagedrag(name)
{
    new Draggable(name);
}
</script>
  <script>
function gen()
{
document.getElementById("wa").innerHTML="<div id='image1'><img
src='html.gif'></div>";
}
  </script>

<body onload="gen()">

           <p id="wa"></p>

<script type="text/javascript">
            imagedrag('image1');

         </script>



--~--~---------~--~----~------------~-------~--~----~
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