<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Dragging and dropping table rows in Javascript</title>
	<atom:link href="http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/</link>
	<description>Thoughts and tutorials on web design, Java, Javascript and project management</description>
	<lastBuildDate>Sat, 04 Feb 2012 18:33:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bill</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1714</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Thu, 01 Dec 2011 12:30:24 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1714</guid>
		<description>Thanks Denis. I suspected that the ID&#039;s were my roadblock. Appreciate the help! Keep up the great work.</description>
		<content:encoded><![CDATA[<p>Thanks Denis. I suspected that the ID&#8217;s were my roadblock. Appreciate the help! Keep up the great work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DenisH</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1710</link>
		<dc:creator>DenisH</dc:creator>
		<pubDate>Thu, 01 Dec 2011 11:26:10 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1710</guid>
		<description>Bill, you&#039;ll need to have some way of giving all the rows a unique identifier otherwise there&#039;s no easy way to get the new order. If you&#039;re repeating the first row using JavaScript, then you need to get it to put unique identifiers on the rows as it goes along. Ditto if it&#039;s generated from Cold Fusion server-side. If you&#039;ve got form elements in the table rows and you&#039;re submitting the whole form, then you should get multiple values for each of the inputs and the order that you receive them should tell you which order the rows were in.

In general, I would use our &lt;a href=&quot;http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/&quot; rel=&quot;nofollow&quot;&gt;jQuery TableDnD&lt;/a&gt; plug-in rather than rolling your own JavaScript, it&#039;s much easier and jQuery gives you so much more.</description>
		<content:encoded><![CDATA[<p>Bill, you&#8217;ll need to have some way of giving all the rows a unique identifier otherwise there&#8217;s no easy way to get the new order. If you&#8217;re repeating the first row using JavaScript, then you need to get it to put unique identifiers on the rows as it goes along. Ditto if it&#8217;s generated from Cold Fusion server-side. If you&#8217;ve got form elements in the table rows and you&#8217;re submitting the whole form, then you should get multiple values for each of the inputs and the order that you receive them should tell you which order the rows were in.</p>
<p>In general, I would use our <a href="http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/" rel="nofollow">jQuery TableDnD</a> plug-in rather than rolling your own JavaScript, it&#8217;s much easier and jQuery gives you so much more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1707</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Wed, 30 Nov 2011 19:50:20 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1707</guid>
		<description>Thanks Denis. I&#039;m not that familiar with Ajax, etc. so I&#039;ll have to do some research. The main thing I&#039;m wondering about is id number for the table rows. I am working with a page that is a repeat region of the first row in the table to auto create the rest of the rows so I&#039;m not sure how to handle that.</description>
		<content:encoded><![CDATA[<p>Thanks Denis. I&#8217;m not that familiar with Ajax, etc. so I&#8217;ll have to do some research. The main thing I&#8217;m wondering about is id number for the table rows. I am working with a page that is a repeat region of the first row in the table to auto create the rest of the rows so I&#8217;m not sure how to handle that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DenisH</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1704</link>
		<dc:creator>DenisH</dc:creator>
		<pubDate>Wed, 30 Nov 2011 09:52:32 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1704</guid>
		<description>Bill, of course you can save the moves to a database, but how you do it is up to you. You could have a form and when the user presses the save button you could interrogate the table to see what the rows are and save the order then. Or you could detect the row drop event and use Ajax to tell the server what the new order is. It depends a lot on what you&#039;re building and what the user will expect to happen.</description>
		<content:encoded><![CDATA[<p>Bill, of course you can save the moves to a database, but how you do it is up to you. You could have a form and when the user presses the save button you could interrogate the table to see what the rows are and save the order then. Or you could detect the row drop event and use Ajax to tell the server what the new order is. It depends a lot on what you&#8217;re building and what the user will expect to happen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1702</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Tue, 29 Nov 2011 18:08:21 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1702</guid>
		<description>Not very useful and no more than a toy if the moves cannot be saved to a database.</description>
		<content:encoded><![CDATA[<p>Not very useful and no more than a toy if the moves cannot be saved to a database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Педа</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1622</link>
		<dc:creator>Педа</dc:creator>
		<pubDate>Mon, 22 Aug 2011 08:40:42 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1622</guid>
		<description>Really good script, Thank you</description>
		<content:encoded><![CDATA[<p>Really good script, Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rveach</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1619</link>
		<dc:creator>rveach</dc:creator>
		<pubDate>Mon, 15 Aug 2011 14:46:50 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1619</guid>
		<description>I would add the code:
if (ev &amp;&amp; ev.preventDefault)
ev.preventDefault();

to the mousedown event. without it, FF4 was selecting the text that was in the table while I was moving a row.</description>
		<content:encoded><![CDATA[<p>I would add the code:<br />
if (ev &amp;&amp; ev.preventDefault)<br />
ev.preventDefault();</p>
<p>to the mousedown event. without it, FF4 was selecting the text that was in the table while I was moving a row.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: José Machado</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1606</link>
		<dc:creator>José Machado</dc:creator>
		<pubDate>Fri, 15 Jul 2011 17:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1606</guid>
		<description>If you want to address rows added dinamycally, just call the function makeDraggable to the row just added:

var tableObj = document.getElementById(‘tableID′);
var tableDnD = new TableDnD();
tableDnD.init( tableObj );

/* create a new row ( rowObj ) and add it dinamycally then call the function below */

tableDnD.makeDraggable(rowObj);</description>
		<content:encoded><![CDATA[<p>If you want to address rows added dinamycally, just call the function makeDraggable to the row just added:</p>
<p>var tableObj = document.getElementById(‘tableID′);<br />
var tableDnD = new TableDnD();<br />
tableDnD.init( tableObj );</p>
<p>/* create a new row ( rowObj ) and add it dinamycally then call the function below */</p>
<p>tableDnD.makeDraggable(rowObj);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nen</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1486</link>
		<dc:creator>nen</dc:creator>
		<pubDate>Wed, 15 Jun 2011 11:39:45 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1486</guid>
		<description>The first exapmle doesn&#039;t work for me (in FF4 and IE8) but the second does. What&#039;s the difference?</description>
		<content:encoded><![CDATA[<p>The first exapmle doesn&#8217;t work for me (in FF4 and IE8) but the second does. What&#8217;s the difference?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus Barnick</title>
		<link>http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/comment-page-3/#comment-1446</link>
		<dc:creator>Markus Barnick</dc:creator>
		<pubDate>Wed, 01 Jun 2011 21:00:35 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/isocra/newsite/posts/2007/07/01/dragging-and-dropping-table-rows-in-javascript/#comment-1446</guid>
		<description>that isn&#039;t a good tutorial. It is not userfriendly and not to use for beginners and people who are NOT JS-Profies.

It explains something &quot;around&quot; and much &quot;tralala&quot; but not how to use.
There is no full example - no download of an example and the Link in &quot;Puttin in  all together&quot; -&gt; &quot;You can download the complete class and other methods from the resources below&quot; -&gt; http://www.isocra.com/#resources links only on a site where nothing is to download.
I think it is nearly useless.
Even you can&#039;t copy it from the sourcecode of this site because there are a hundred of other includes you don&#039;t know which one to use.

there is no hint that you must write something like this:






function start()  // Here you must write it as a function that you can call it on onLoad !!!
{
	var table = document.getElementById(&#039;table-1&#039;);
	var tableDnD = new TableDnD();
	tableDnD.init(table);
}




...

Even there is no information how to adress the new order for saving it into a database :-(</description>
		<content:encoded><![CDATA[<p>that isn&#8217;t a good tutorial. It is not userfriendly and not to use for beginners and people who are NOT JS-Profies.</p>
<p>It explains something &#8220;around&#8221; and much &#8220;tralala&#8221; but not how to use.<br />
There is no full example &#8211; no download of an example and the Link in &#8220;Puttin in  all together&#8221; -&gt; &#8220;You can download the complete class and other methods from the resources below&#8221; -&gt; <a href="http://www.isocra.com/#resources" rel="nofollow">http://www.isocra.com/#resources</a> links only on a site where nothing is to download.<br />
I think it is nearly useless.<br />
Even you can&#8217;t copy it from the sourcecode of this site because there are a hundred of other includes you don&#8217;t know which one to use.</p>
<p>there is no hint that you must write something like this:</p>
<p>function start()  // Here you must write it as a function that you can call it on onLoad !!!<br />
{<br />
	var table = document.getElementById(&#8216;table-1&#8242;);<br />
	var tableDnD = new TableDnD();<br />
	tableDnD.init(table);<br />
}</p>
<p>&#8230;</p>
<p>Even there is no information how to adress the new order for saving it into a database <img src='http://www.isocra.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

