<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Sortable Lists in PHP Walkthrough</title>
	<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/</link>
	<description>paul's tech rambles</description>
	<pubDate>Sat, 04 Feb 2012 16:34:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Fred Z.</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1799</link>
		<author>Fred Z.</author>
		<pubDate>Mon, 28 Jan 2008 13:43:40 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1799</guid>
		<description>A big thank for this, it was just what I was lookin for in a professional project, saved me a lot of time !</description>
		<content:encoded><![CDATA[<p>A big thank for this, it was just what I was lookin for in a professional project, saved me a lot of time !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1643</link>
		<author>Andy</author>
		<pubDate>Fri, 18 Jan 2008 11:03:09 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1643</guid>
		<description>Great tutorial and works like a treat. I would like to know how to add some extra functionality, but I am having problems. I am working on a project that allows academic staff within a university to create a menu and reorder it (sortable list) by using a handle. This works great.

What I then want to do is to use scriptaculous editinplace to allow a menu item (item in the list) to be editted. I have the code in place, but in Firefox the class is included in the textfield along with the list item and in IE the entire code for the editinplace is included.

I must be doing something fundamentally wrong.

Any ideas?

thanks in advanced</description>
		<content:encoded><![CDATA[<p>Great tutorial and works like a treat. I would like to know how to add some extra functionality, but I am having problems. I am working on a project that allows academic staff within a university to create a menu and reorder it (sortable list) by using a handle. This works great.</p>
<p>What I then want to do is to use scriptaculous editinplace to allow a menu item (item in the list) to be editted. I have the code in place, but in Firefox the class is included in the textfield along with the list item and in IE the entire code for the editinplace is included.</p>
<p>I must be doing something fundamentally wrong.</p>
<p>Any ideas?</p>
<p>thanks in advanced</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavel</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1419</link>
		<author>Pavel</author>
		<pubDate>Thu, 03 Jan 2008 09:56:01 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1419</guid>
		<description>Thanks - real world example!

I used it in Administration part of our application.</description>
		<content:encoded><![CDATA[<p>Thanks - real world example!</p>
<p>I used it in Administration part of our application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mrman</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1161</link>
		<author>mrman</author>
		<pubDate>Tue, 18 Dec 2007 18:36:31 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1161</guid>
		<description>finally found the cause of my trouble - there seems to have been a conflict with another javascript library I was also using. disabling the other library cured the ajax.response problem</description>
		<content:encoded><![CDATA[<p>finally found the cause of my trouble - there seems to have been a conflict with another javascript library I was also using. disabling the other library cured the ajax.response problem</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mrman</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1153</link>
		<author>mrman</author>
		<pubDate>Mon, 17 Dec 2007 20:58:57 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-1153</guid>
		<description>I'm also having problems with the ajax.Request function. everything else is working fine - the order is generated, is draggable and is being serialized properly but the ajax.request function isn't firing at all. It's showing no data being sent whatsoever in firebug. I've checked the element id is correct and can't think what else could be wrong.

it's driving me nuts!</description>
		<content:encoded><![CDATA[<p>I&#8217;m also having problems with the ajax.Request function. everything else is working fine - the order is generated, is draggable and is being serialized properly but the ajax.request function isn&#8217;t firing at all. It&#8217;s showing no data being sent whatsoever in firebug. I&#8217;ve checked the element id is correct and can&#8217;t think what else could be wrong.</p>
<p>it&#8217;s driving me nuts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-490</link>
		<author>Nick</author>
		<pubDate>Fri, 09 Nov 2007 20:05:20 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-490</guid>
		<description>I'm having some major problems.  Been battling with it for 2 days now.

Basically, the onUpdate function doesn't seem to execute.

&lt;code&gt;
Sortable.create('profile', {tag:'div', handle: 'drag',
	onUpdate: function() 
	{
		new Ajax.Request("config['site']['url']; ?&#62;scripts/dynamic.php",
		{
			method: "post",
			parameters: { data: Sortable.serialize("profile"), do: "profile_structure", userid: ""}
		});
	}
});
&lt;/code&gt;

I've tried debugging the best I can, sticking an alert in, using Firebug but it seems as though the function just isn't called.

The actual sortable drag elements work fine it's just the update function.

Anyone got any idea's?</description>
		<content:encoded><![CDATA[<p>I&#8217;m having some major problems.  Been battling with it for 2 days now.</p>
<p>Basically, the onUpdate function doesn&#8217;t seem to execute.</p>
<p><code><br />
Sortable.create('profile', {tag:'div', handle: 'drag',<br />
	onUpdate: function()<br />
	{<br />
		new Ajax.Request("config['site']['url']; ?&gt;scripts/dynamic.php",<br />
		{<br />
			method: "post",<br />
			parameters: { data: Sortable.serialize("profile"), do: "profile_structure", userid: ""}<br />
		});<br />
	}<br />
});<br />
</code></p>
<p>I&#8217;ve tried debugging the best I can, sticking an alert in, using Firebug but it seems as though the function just isn&#8217;t called.</p>
<p>The actual sortable drag elements work fine it&#8217;s just the update function.</p>
<p>Anyone got any idea&#8217;s?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-374</link>
		<author>Jason</author>
		<pubDate>Thu, 25 Oct 2007 18:34:23 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-374</guid>
		<description>I think I figured it out.  Do you see any issue with this:

I added an extra character to the unique ID passed for each draggable.  This extra character denotes which list/table the item came from.  On the 'file_to_call' page I can strip off the extra character for each item in the array and use it to determine what I do in the database.  If its an 'A' in the 'B' list then I can have the code copy the 'A' record to the 'B' table and then delete the 'A' record.  If its an 'A' in the 'A' list, then the code will just reorder the list.

Does this sound like a viable solution?</description>
		<content:encoded><![CDATA[<p>I think I figured it out.  Do you see any issue with this:</p>
<p>I added an extra character to the unique ID passed for each draggable.  This extra character denotes which list/table the item came from.  On the &#8216;file_to_call&#8217; page I can strip off the extra character for each item in the array and use it to determine what I do in the database.  If its an &#8216;A&#8217; in the &#8216;B&#8217; list then I can have the code copy the &#8216;A&#8217; record to the &#8216;B&#8217; table and then delete the &#8216;A&#8217; record.  If its an &#8216;A&#8217; in the &#8216;A&#8217; list, then the code will just reorder the list.</p>
<p>Does this sound like a viable solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-372</link>
		<author>Jason</author>
		<pubDate>Thu, 25 Oct 2007 16:14:10 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-372</guid>
		<description>I am trying to use a drag/drop feature for a client site now and this has helped a great deal.  One thing that I am struggling with now though is this:

I am dragging items between lists and have that successfully enabled.  I have list 'A' and List 'B'.  List 'A' data is dynamicly generated from table 'A' in the database.  'B' is done likewise.  If I drag an item from List 'A' to List 'B' I need to delete the record in table 'A' and create a record in table 'B' all the while setting the sort order.

Is this possible or should I just enable a standard form with a checkbox for each item.  If they want to move it to the other list, they check it off and submit the form which refreshes the page etc...  I dont like this because it basically removes the whole point of the Ajax drag and drop.  Please let me know, if you can, what I might be able to do in order to enable the drag drop update in the manner described above.

I was thinking that I could pass a post header variable somehow and run and if/then statement in the file_to_call that determines what list the item came from.  If it was the other list, then it would create/delete/update as needed and if the item came from the same list, it would just update.  Am I heading in the right direction?  If so, how could I pass a post header variable?</description>
		<content:encoded><![CDATA[<p>I am trying to use a drag/drop feature for a client site now and this has helped a great deal.  One thing that I am struggling with now though is this:</p>
<p>I am dragging items between lists and have that successfully enabled.  I have list &#8216;A&#8217; and List &#8216;B&#8217;.  List &#8216;A&#8217; data is dynamicly generated from table &#8216;A&#8217; in the database.  &#8216;B&#8217; is done likewise.  If I drag an item from List &#8216;A&#8217; to List &#8216;B&#8217; I need to delete the record in table &#8216;A&#8217; and create a record in table &#8216;B&#8217; all the while setting the sort order.</p>
<p>Is this possible or should I just enable a standard form with a checkbox for each item.  If they want to move it to the other list, they check it off and submit the form which refreshes the page etc&#8230;  I dont like this because it basically removes the whole point of the Ajax drag and drop.  Please let me know, if you can, what I might be able to do in order to enable the drag drop update in the manner described above.</p>
<p>I was thinking that I could pass a post header variable somehow and run and if/then statement in the file_to_call that determines what list the item came from.  If it was the other list, then it would create/delete/update as needed and if the item came from the same list, it would just update.  Am I heading in the right direction?  If so, how could I pass a post header variable?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-337</link>
		<author>Matt</author>
		<pubDate>Fri, 19 Oct 2007 13:22:07 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-337</guid>
		<description>A friend figured it out. Thanks.</description>
		<content:encoded><![CDATA[<p>A friend figured it out. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-311</link>
		<author>Matt</author>
		<pubDate>Mon, 15 Oct 2007 20:17:57 +0000</pubDate>
		<guid>http://www.zenperfect.com/2007/07/26/sortable-lists-in-php-walkthrough/#comment-311</guid>
		<description>Turns out, according to the Firefox Error Console, "Too much recursion."

I'd really like to use this script - if someone could help me out, that would be very much appreciated.

Thanks!
matt</description>
		<content:encoded><![CDATA[<p>Turns out, according to the Firefox Error Console, &#8220;Too much recursion.&#8221;</p>
<p>I&#8217;d really like to use this script - if someone could help me out, that would be very much appreciated.</p>
<p>Thanks!<br />
matt</p>
]]></content:encoded>
	</item>
</channel>
</rss>

