<?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: Select content from one list to another using jQuery</title>
	<atom:link href="http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/</link>
	<description>PHP, MySql, JavaScript, JQuery, Prototype, Drupal, HTML, CSS and more...</description>
	<lastBuildDate>Thu, 05 Jan 2012 12:42:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Viktor</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-55929</link>
		<dc:creator>Viktor</dc:creator>
		<pubDate>Fri, 11 Nov 2011 09:38:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-55929</guid>
		<description>Hello, thank you very much for the wonderful script.
I have a question! Can I do so that would be chosen by users who have already been recorded in the database have already been allocated in the right box?</description>
		<content:encoded><![CDATA[<p>Hello, thank you very much for the wonderful script.<br />
I have a question! Can I do so that would be chosen by users who have already been recorded in the database have already been allocated in the right box?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-53228</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Wed, 05 Oct 2011 08:59:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-53228</guid>
		<description>This is a great script. How could i change it to this scenario?

I have a table of games in a grid, say 4 x 4. I want to drag any one of the td elements to another and invoke a function with the id numbers of each div, the source and the target.

I plan to make each table td contain a div with an id for the game.</description>
		<content:encoded><![CDATA[<p>This is a great script. How could i change it to this scenario?</p>
<p>I have a table of games in a grid, say 4 x 4. I want to drag any one of the td elements to another and invoke a function with the id numbers of each div, the source and the target.</p>
<p>I plan to make each table td contain a div with an id for the game.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sumit</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-52952</link>
		<dc:creator>sumit</dc:creator>
		<pubDate>Fri, 30 Sep 2011 12:07:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-52952</guid>
		<description>I just added &quot;&quot; in all  tag</description>
		<content:encoded><![CDATA[<p>I just added &#8220;&#8221; in all  tag</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sumit</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-52951</link>
		<dc:creator>sumit</dc:creator>
		<pubDate>Fri, 30 Sep 2011 12:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-52951</guid>
		<description>I am trying to use this script. I am assigning a hidden input field to the div..
When i inspect the elements..it see the div that I have moved is actually ..I am not getting how to get the values from the input elements in #view..
--My code---
				      
            All Users 
             
           		 
					 
					    
                    	User ID: 1 
                        &#160;&#160;Select it. 
                     
                  
                 
				    
				     
                    	User ID: 2 
                        &#160;&#160;Select it. 
                     
                 
                 
                     
                    
                    	User ID: 3 
                    	&#160;&#160;Select it. 
					 
                 
                 
                     
                    
                    	User ID: 4 
                    	&#160;&#160;Select it. 
					 
                 
                 
                     
                    
                    	User ID: 5 
                    	&#160;&#160;Select it. 
					 
                 
                 
                     
                    
                    	User ID: 6 
                    	&#160;&#160;Select it. 
					 
                 
                 
                     
                    
                    	User ID: 7 
                    	&#160;&#160;Select it. 
					 
                 
                 
             
             
           	&lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;Right &#187;&lt;/a&gt; 
            &lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;&#171; Left&lt;/a&gt; 
               
            
            
             
              
          	  
          	   Select maximum 5. 
          	  
			
           
           
           
             
             
           
         
       
     
</description>
		<content:encoded><![CDATA[<p>I am trying to use this script. I am assigning a hidden input field to the div..<br />
When i inspect the elements..it see the div that I have moved is actually ..I am not getting how to get the values from the input elements in #view..<br />
&#8211;My code&#8212;</p>
<p>            All Users </p>
<p>                    	User ID: 1<br />
                        &nbsp;&nbsp;Select it. </p>
<p>                    	User ID: 2<br />
                        &nbsp;&nbsp;Select it. </p>
<p>                    	User ID: 3<br />
                    	&nbsp;&nbsp;Select it. </p>
<p>                    	User ID: 4<br />
                    	&nbsp;&nbsp;Select it. </p>
<p>                    	User ID: 5<br />
                    	&nbsp;&nbsp;Select it. </p>
<p>                    	User ID: 6<br />
                    	&nbsp;&nbsp;Select it. </p>
<p>                    	User ID: 7<br />
                    	&nbsp;&nbsp;Select it. </p>
<p>           	<a href="#" rel="nofollow">Right &raquo;</a><br />
            <a href="#" rel="nofollow">&laquo; Left</a> </p>
<p>          	   Select maximum 5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-52387</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 20 Sep 2011 04:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-52387</guid>
		<description>&lt;a href=&quot;#comment-52350&quot; rel=&quot;nofollow&quot;&gt;@David Buckley&lt;/a&gt; 
Hi David,

To save selected categories in DB you need to send the ID&#039;s of selected categories to server using AJAX. You can use jQuery for you AJAX implementation. You need to modify the function called on click of &quot;View&quot; button. Here is the updated code snippet:

$(&#039;#view&#039;).click(function() {
	var users = &quot;;
	
    $(&#039;#selected_users .innertxt2&#039;).each(function() {
		var user_id = $(this).attr(&#039;userid&#039;);
		if (users == &quot;)
			users += user_id;
		else
			users += &#039;,&#039; + user_id;
	});
    
	if (users == &#039;&#039;) {
    	alert(&#039;Select category&#039;);
        return;
    }

    jQuery.ajax({
        url:&#039;php_file.php&#039;,
        data:{&#039;selected_cids&#039;: users},
        type:&#039;POST&#039;,
        success:function(info) {
            alert(&#039;Data has been save successfully in DB.&#039;);
        }
    });
});

You can retrieve the selected category ID&#039;s at server side using $_POST[&#039;selected_cids&#039;].</description>
		<content:encoded><![CDATA[<p><a href="#comment-52350" rel="nofollow">@David Buckley</a><br />
Hi David,</p>
<p>To save selected categories in DB you need to send the ID&#8217;s of selected categories to server using AJAX. You can use jQuery for you AJAX implementation. You need to modify the function called on click of &#8220;View&#8221; button. Here is the updated code snippet:</p>
<p>$(&#8216;#view&#8217;).click(function() {<br />
	var users = &#8220;;</p>
<p>    $(&#8216;#selected_users .innertxt2&#8242;).each(function() {<br />
		var user_id = $(this).attr(&#8216;userid&#8217;);<br />
		if (users == &#8220;)<br />
			users += user_id;<br />
		else<br />
			users += &#8216;,&#8217; + user_id;<br />
	});</p>
<p>	if (users == &#8221;) {<br />
    	alert(&#8216;Select category&#8217;);<br />
        return;<br />
    }</p>
<p>    jQuery.ajax({<br />
        url:&#8217;php_file.php&#8217;,<br />
        data:{&#8216;selected_cids&#8217;: users},<br />
        type:&#8217;POST&#8217;,<br />
        success:function(info) {<br />
            alert(&#8216;Data has been save successfully in DB.&#8217;);<br />
        }<br />
    });<br />
});</p>
<p>You can retrieve the selected category ID&#8217;s at server side using $_POST['selected_cids'].</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Buckley</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-52350</link>
		<dc:creator>David Buckley</dc:creator>
		<pubDate>Mon, 19 Sep 2011 14:20:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-52350</guid>
		<description>I am using your script for a client category selection for his web site however How would I go about saving the values in the selected list to database using php where in your code would i need to put in the jquery code

php and mysql

Thanks
David</description>
		<content:encoded><![CDATA[<p>I am using your script for a client category selection for his web site however How would I go about saving the values in the selected list to database using php where in your code would i need to put in the jquery code</p>
<p>php and mysql</p>
<p>Thanks<br />
David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreea</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-45541</link>
		<dc:creator>Andreea</dc:creator>
		<pubDate>Mon, 13 Jun 2011 14:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-45541</guid>
		<description>Hi Anil!
I looked at your code and it is wonderful but I was wondering how could it be modified to just copy the elements from one list to another. If you delete the part where the elements in the old list get removed then you will have two elements with the same attributes and so on and everything goes wrong afterwards. Do you have any idea on how to do it?
Thanks!</description>
		<content:encoded><![CDATA[<p>Hi Anil!<br />
I looked at your code and it is wonderful but I was wondering how could it be modified to just copy the elements from one list to another. If you delete the part where the elements in the old list get removed then you will have two elements with the same attributes and so on and everything goes wrong afterwards. Do you have any idea on how to do it?<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hina</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-42822</link>
		<dc:creator>Hina</dc:creator>
		<pubDate>Tue, 26 Apr 2011 07:37:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-42822</guid>
		<description>Please help me ..Its not throwing any error but data still not move to second list ..I just debug this and got to know this function is not callin ..do u know why?
$(&#039;#all_users .innertxt_bg&#039;).each(function() {</description>
		<content:encoded><![CDATA[<p>Please help me ..Its not throwing any error but data still not move to second list ..I just debug this and got to know this function is not callin ..do u know why?<br />
$(&#8216;#all_users .innertxt_bg&#8217;).each(function() {</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jhonny</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-42434</link>
		<dc:creator>Jhonny</dc:creator>
		<pubDate>Sat, 16 Apr 2011 23:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-42434</guid>
		<description>Hi, I think your script is great, but I can&#039;t still use it correctly. I use ajax to generate the elements on the list, everything works, except when I try to take an element from left to right. 

I read your answer to Twitch and try to use that, but still don&#039;t get results.

Here is my code:


$(document).ready(function () {
                  $.ajax({
                  type: &quot;GET&quot;,
                  url: &#039;&#039;,
                  dataType: &quot;xml&quot;, // I use xml
                  success: function(xml){
                      var cadena=&quot;&quot;;
                     $(xml).find(&quot;alumno&quot;).each(function () {
                            cadena=cadena+&#039;\n\
                                                   &#039;+$(this).find(&quot;nombre&quot;).text()+&#039;\n\
                                                        \n\
                                                        \n\
                                                         &#160;&#160;Select it.&#039;;
                          });
                          $(&#039;#all_users&#039;).html(cadena);
                          $(&#039;#all_users .selectit&#039;).click(function() {
                                    var userid = $(this).val();

                                    $(&#039;#user&#039; + userid).toggleClass(&#039;innertxt_bg&#039;);
                            });
                            $(&#039;#selected_users .selectit&#039;).click(function() {
                                    var userid = $(this).val();
                                    $(&#039;#user&#039; + userid).toggleClass(&#039;innertxt_bg&#039;);
                            });
//                          asignarAcciones();

                  }

                 });

            colocarOpciones(); // I call hear to the other functions 
	});
}

Thanks

Jhonny, from Ecuador</description>
		<content:encoded><![CDATA[<p>Hi, I think your script is great, but I can&#8217;t still use it correctly. I use ajax to generate the elements on the list, everything works, except when I try to take an element from left to right. </p>
<p>I read your answer to Twitch and try to use that, but still don&#8217;t get results.</p>
<p>Here is my code:</p>
<p>$(document).ready(function () {<br />
                  $.ajax({<br />
                  type: &#8220;GET&#8221;,<br />
                  url: &#8221;,<br />
                  dataType: &#8220;xml&#8221;, // I use xml<br />
                  success: function(xml){<br />
                      var cadena=&#8221;";<br />
                     $(xml).find(&#8220;alumno&#8221;).each(function () {<br />
                            cadena=cadena+&#8217;\n\<br />
                                                   &#8216;+$(this).find(&#8220;nombre&#8221;).text()+&#8217;\n\<br />
                                                        \n\<br />
                                                        \n\<br />
                                                         &nbsp;&nbsp;Select it.&#8217;;<br />
                          });<br />
                          $(&#8216;#all_users&#8217;).html(cadena);<br />
                          $(&#8216;#all_users .selectit&#8217;).click(function() {<br />
                                    var userid = $(this).val();</p>
<p>                                    $(&#8216;#user&#8217; + userid).toggleClass(&#8216;innertxt_bg&#8217;);<br />
                            });<br />
                            $(&#8216;#selected_users .selectit&#8217;).click(function() {<br />
                                    var userid = $(this).val();<br />
                                    $(&#8216;#user&#8217; + userid).toggleClass(&#8216;innertxt_bg&#8217;);<br />
                            });<br />
//                          asignarAcciones();</p>
<p>                  }</p>
<p>                 });</p>
<p>            colocarOpciones(); // I call hear to the other functions<br />
	});<br />
}</p>
<p>Thanks</p>
<p>Jhonny, from Ecuador</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nirmala</title>
		<link>http://www.akchauhan.com/select-content-from-one-list-to-another-using-jquery/comment-page-1/#comment-41174</link>
		<dc:creator>nirmala</dc:creator>
		<pubDate>Tue, 29 Mar 2011 06:43:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.akchauhan.com/?p=3#comment-41174</guid>
		<description>it&#039;s working have some problem for maintain client status .i wish to refresh a left div only while i close my new window .how&#039;s tat?</description>
		<content:encoded><![CDATA[<p>it&#8217;s working have some problem for maintain client status .i wish to refresh a left div only while i close my new window .how&#8217;s tat?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

