Error with drag and drop script

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
MicroBoy
Forum Contributor
Posts: 112
Joined: Sat Mar 14, 2009 5:16 pm

Error with drag and drop script

Post 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>
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Error with drag and drop script

Post by Jade »

Looks like a problem with your javascript file.
Post Reply