Welcome Guest, Not a member yet? Register   Sign In
Drag and drop fail when called via ajax
#1

[eluser]Unknown[/eluser]
Dear All,
I have two pages with the similar codes. One is here http://183.78.169.53/tm/addTyreSwap1.php in this page you have select the vehicle via the drop down list then a number of tyre will appear via the ajax call. The problem is that both the draggable and droppable is attached to it but is not working. On the other hand I have another page http://183.78.169.53/tm/getTyreLayoutDetails1.php?l=3 here which directly generate the tyre layout and both drag n drop works perfects fine. Both are using the same codes. Only one is via ajax. Any idea why it fails in ajax? To my suprise both pages have the same coding. A snippet of codes is below. But when I go through the output the first page is <span class="droppable"> and second generates this <span class="droppable ui-droppable">. My guess for the solution is reassign the drag and drop the new data after ajax call which is where I am stuck any idea? I do not know how to use the live function here.
Code:
echo "<div class='t1'>";    
echo "<span class=\"droppable\">";
echo "<b>".$loPosition."</b>";
echo "<img  >";
echo "</span>";




Theme © iAndrew 2016 - Forum software by © MyBB