Page 1 of 1

Error with drag and drop script

Posted: Wed May 25, 2011 1:03 am
by MicroBoy
Hi to all, I have a script which I use to drag and drop image's thumbs and to save the order in MySQL, everything works ok when the script is like above in the first section, but when I add a div the script does not work, the order is not saved on MySQL, where can be the problem?? at the javascript file? at the php file?? If you want I can show the javscript code too if you think that there is the problem...?

This way it works:

Code: Select all

<div id="sortable-thumbs">
	<?php
                include("connect.php");
				$query  = "SELECT * fashion ORDER BY listorder ASC";
				$result = mysql_query($query);
				while($row = mysql_fetch_array($result, MYSQL_ASSOC))
				{
					
				$id = stripslashes($row['id']);
				$emri = stripslashes($row['emri']);
				$lidhja = stripslashes($row['lidhja']);
					
				?>
    	  <img src="../imazhet/fashion/thumbs/<?php echo $lidhja; ?>" id="<?php echo $id; ?>" alt="" height="100" width="100" />
			<?php
		  }
		  ?>
	</div>
But I need it like this and it does not work:

Code: Select all

<div id="sortable-thumbs">
		<?php
                include("connect.php");
				$query  = "SELECT * FROM fashion ORDER BY listorder ASC";
				$result = mysql_query($query);
				while($row = mysql_fetch_array($result, MYSQL_ASSOC))
				{
					
				$id = stripslashes($row['id']);
				$emri = stripslashes($row['emri']);
				$lidhja = stripslashes($row['lidhja']);
					
				?>
				<div class="foto_thumbs">
            		<img src="../imazhet/fashion/thumbs/<?php echo $lidhja; ?>" id="<?php echo $id; ?>" alt="" height="90" width="90" />
            		<div class="info_th">21332views <a href="#"><img src="images/del_icon.jpg" width="17" height="17" alt="Delete" /></a></div>
            	</div>
		  <?php
		  }
		  ?>
		</div>

Re: Error with drag and drop script

Posted: Thu Jun 02, 2011 10:25 am
by Jade
Looks like a problem with your javascript file.