<?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: jQuery для начинающих. Часть 3. AJAX</title>
	<atom:link href="http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/</link>
	<description>Web-разработчик</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:54:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Georgy</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-63103</link>
		<dc:creator>Georgy</dc:creator>
		<pubDate>Mon, 16 Jan 2012 20:05:54 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-63103</guid>
		<description>Подскажите, пожалуйста, что не так, почему не работает?

[php]
&lt;div id=&quot;loading_content&quot; style=&quot;display: none;&quot;&gt;&lt;img src=&quot;/themes/site_style/load.gif&quot; class=&quot;no&quot; align=&quot;center&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;comment_content&quot;&gt;&lt;/div&gt;  

&lt;script&gt;  
        function show_comments()  
        {  
            $.ajax({  
                url: &quot;http://site.ru/main_comments/&quot;,  
                cache: false,  
                beforeSend: function(html){  
                    $(&quot;#loading_content&quot;).html(html);  
                }
                success: function(html){  
                    $(&quot;#comment_content&quot;).html(html);  
                }
            });  
        }  
     
$(&quot;#loading_content&quot;).bind(&quot;ajaxSend&quot;, function(){
    $(this).show();
}).bind(&quot;ajaxComplete&quot;, function(){
    $(this).hide();
});

&lt;/script&gt;
[/php]</description>
		<content:encoded><![CDATA[<p>Подскажите, пожалуйста, что не так, почему не работает?</p>
<pre class="brush: php; title: ; notranslate">
&lt;div id=&quot;loading_content&quot; style=&quot;display: none;&quot;&gt;&lt;img src=&quot;/themes/site_style/load.gif&quot; class=&quot;no&quot; align=&quot;center&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;comment_content&quot;&gt;&lt;/div&gt;  

&lt;script&gt;
        function show_comments()
        {
            $.ajax({
                url: &quot;<a href="http://site.ru/main_comments/&quot;" rel="nofollow">http://site.ru/main_comments/&quot;</a>,
                cache: false,
                beforeSend: function(html){
                    $(&quot;#loading_content&quot;).html(html);
                }
                success: function(html){
                    $(&quot;#comment_content&quot;).html(html);
                }
            });
        }  

$(&quot;#loading_content&quot;).bind(&quot;ajaxSend&quot;, function(){
    $(this).show();
}).bind(&quot;ajaxComplete&quot;, function(){
    $(this).hide();
});

&lt;/script&gt;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Юрий</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-63100</link>
		<dc:creator>Юрий</dc:creator>
		<pubDate>Thu, 12 Jan 2012 21:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-63100</guid>
		<description>А очень тяжело будет приделать такую штуку:
есть блог на вордпресс,
на главной странице, при клике на заголовок статьи, не переходить на новую страницу, а подгрузить из базы не достающий контент.
Тогда бы пользователю не пришлось бы грузить новую страницу..

в общем аналог pikabu.ru только для вордпрпеса</description>
		<content:encoded><![CDATA[<p>А очень тяжело будет приделать такую штуку:<br />
есть блог на вордпресс,<br />
на главной странице, при клике на заголовок статьи, не переходить на новую страницу, а подгрузить из базы не достающий контент.<br />
Тогда бы пользователю не пришлось бы грузить новую страницу..</p>
<p>в общем аналог pikabu.ru только для вордпрпеса</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Георгий.</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-63052</link>
		<dc:creator>Георгий.</dc:creator>
		<pubDate>Wed, 14 Dec 2011 07:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-63052</guid>
		<description>По поводу JSON
В тексте - {
    note:{
        to:&#039;Tove&#039;,
        from:&#039;Jani&#039;,
        heading:&#039;Reminder&#039;,
        body:&#039;Don\&#039;t forget me this weekend!&#039;
    }
} - не работает


вот так -
{
    &quot;note&quot;:{
        &quot;to&quot;:&quot;Tove&quot;,
        &quot;from&quot;:&quot;Jani&quot;,
        &quot;heading&quot;:&quot;Reminder&quot;,
        &quot;body&quot;:&quot;Don&#039;t forget me this weekend!&quot;
    }
} - работает</description>
		<content:encoded><![CDATA[<p>По поводу JSON<br />
В тексте &#8211; {<br />
    note:{<br />
        to:&#8217;Tove&#8217;,<br />
        from:&#8217;Jani&#8217;,<br />
        heading:&#8217;Reminder&#8217;,<br />
        body:&#8217;Don\&#8217;t forget me this weekend!&#8217;<br />
    }<br />
} &#8211; не работает</p>
<p>вот так -<br />
{<br />
    &#8220;note&#8221;:{<br />
        &#8220;to&#8221;:&#8221;Tove&#8221;,<br />
        &#8220;from&#8221;:&#8221;Jani&#8221;,<br />
        &#8220;heading&#8221;:&#8221;Reminder&#8221;,<br />
        &#8220;body&#8221;:&#8221;Don&#8217;t forget me this weekend!&#8221;<br />
    }<br />
} &#8211; работает</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Николай</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-63043</link>
		<dc:creator>Николай</dc:creator>
		<pubDate>Sat, 10 Dec 2011 02:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-63043</guid>
		<description>А вот если такая ситуация, у меня аяксом загружается контент в котором есть кнопочки для которых есть свой css, так вот если использовать
[js]$(&quot;something&quot;).html(data) [/js]
для загрузки данных стили не действуют на вновь добавленные кнопки =(</description>
		<content:encoded><![CDATA[<p>А вот если такая ситуация, у меня аяксом загружается контент в котором есть кнопочки для которых есть свой css, так вот если использовать</p>
<pre class="brush: jscript; title: ; notranslate">$(&quot;something&quot;).html(data) </pre>
<p>для загрузки данных стили не действуют на вновь добавленные кнопки =(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Олег</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-62957</link>
		<dc:creator>Олег</dc:creator>
		<pubDate>Sun, 13 Nov 2011 09:34:36 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-62957</guid>
		<description>xml файл выглядит так:
[html]&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;note&gt;
    &lt;to&gt;Tove&lt;/to&gt;
    &lt;from&gt;Jani&lt;/from&gt;
    &lt;heading&gt;Reminder&lt;/heading&gt;
    &lt;body&gt;Don&#039;t forget me this weekend!&lt;/body&gt;
    &lt;to&gt;Mike&lt;/to&gt;
    &lt;from&gt;Jessy&lt;/from&gt;
    &lt;heading&gt;Hello&lt;/heading&gt;
    &lt;body&gt;Hello World!&lt;/body&gt;
&lt;/note&gt;[/html]</description>
		<content:encoded><![CDATA[<p>xml файл выглядит так:</p>
<pre class="brush: xml; title: ; notranslate">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;note&gt;
    &lt;to&gt;Tove&lt;/to&gt;
    &lt;from&gt;Jani&lt;/from&gt;
    &lt;heading&gt;Reminder&lt;/heading&gt;
    &lt;body&gt;Don't forget me this weekend!&lt;/body&gt;
    &lt;to&gt;Mike&lt;/to&gt;
    &lt;from&gt;Jessy&lt;/from&gt;
    &lt;heading&gt;Hello&lt;/heading&gt;
    &lt;body&gt;Hello World!&lt;/body&gt;
&lt;/note&gt;</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Олег</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-62956</link>
		<dc:creator>Олег</dc:creator>
		<pubDate>Sun, 13 Nov 2011 09:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-62956</guid>
		<description>А не подскажите, если бы xml файл выглядел так:



    Tove
    Jani
    Reminder
    Don&#039;t forget me this weekend!
    Mike
    Jessy
    Hello
    Hello world!


То как реализовать загрузку данных из него,чтобы конечный результат выглядел так:

To:Tove
From: Jani
Reminder
Dont forget me this weekend

To: Mike
From: Jessy
Hello
Hello world!

Потому что если просто внести изменения в xml-файл, то все будет выглядеть как
To: ToveMike
From: JaniJessy и т.д.

Вариант назначать в xmle каждой строчке свой идентификатор, типа To, To1&lt; To2... не подходит.</description>
		<content:encoded><![CDATA[<p>А не подскажите, если бы xml файл выглядел так:</p>
<p>    Tove<br />
    Jani<br />
    Reminder<br />
    Don&#8217;t forget me this weekend!<br />
    Mike<br />
    Jessy<br />
    Hello<br />
    Hello world!</p>
<p>То как реализовать загрузку данных из него,чтобы конечный результат выглядел так:</p>
<p>To:Tove<br />
From: Jani<br />
Reminder<br />
Dont forget me this weekend</p>
<p>To: Mike<br />
From: Jessy<br />
Hello<br />
Hello world!</p>
<p>Потому что если просто внести изменения в xml-файл, то все будет выглядеть как<br />
To: ToveMike<br />
From: JaniJessy и т.д.</p>
<p>Вариант назначать в xmle каждой строчке свой идентификатор, типа To, To1&lt; To2&#8230; не подходит.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton Shevchuk</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-62931</link>
		<dc:creator>Anton Shevchuk</dc:creator>
		<pubDate>Mon, 31 Oct 2011 15:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-62931</guid>
		<description>Это функция из native javascript - $(&quot;#myform&quot;)[0] - это первый элемент из выборки без обертки jQuery</description>
		<content:encoded><![CDATA[<p>Это функция из native javascript &#8211; $(&#8220;#myform&#8221;)[0] &#8211; это первый элемент из выборки без обертки jQuery</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Руслан</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-62925</link>
		<dc:creator>Руслан</dc:creator>
		<pubDate>Mon, 24 Oct 2011 22:38:43 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-62925</guid>
		<description>Вот так работает - форма ресетится
[js]$(&quot;#myform&quot;)[0].reset();[/js]
Почему в этом списке &lt;a href=&quot;http://api.jquery.com/category/events/form-events/&quot; rel=&quot;nofollow&quot;&gt; нет .reset() - загадка сия велика есть...</description>
		<content:encoded><![CDATA[<p>Вот так работает &#8211; форма ресетится</p>
<pre class="brush: jscript; title: ; notranslate">$(&quot;#myform&quot;)[0].reset();</pre>
<p>Почему в этом списке <a href="http://api.jquery.com/category/events/form-events/" rel="nofollow"> нет .reset() &#8211; загадка сия велика есть&#8230;</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Дмитрий</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-62916</link>
		<dc:creator>Дмитрий</dc:creator>
		<pubDate>Tue, 18 Oct 2011 14:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-62916</guid>
		<description>Гениально, но я, видимо, не корифей.
Возврат с сервера:
{k1:{k1t1:k1v1,k1t2:k1v2},k1:{k1t1:k1v1,k1t2:k1v2}}
так вот, получается следующее:
$.each(str,function(t,s) { echo t+&quot;##&quot;+s; // здесь выводит &quot;k1&quot; и undefined (а хотелось {k1t1:k1v1,k1t2:k1v2})
 $.each(s,function(key,val) { здесь, естественно, посылает очень далеко, поскольку undefined
 echo key+&quot;:&quot;+val;
 });
 });</description>
		<content:encoded><![CDATA[<p>Гениально, но я, видимо, не корифей.<br />
Возврат с сервера:<br />
{k1:{k1t1:k1v1,k1t2:k1v2},k1:{k1t1:k1v1,k1t2:k1v2}}<br />
так вот, получается следующее:<br />
$.each(str,function(t,s) { echo t+&#8221;##&#8221;+s; // здесь выводит &#8220;k1&#8243; и undefined (а хотелось {k1t1:k1v1,k1t2:k1v2})<br />
 $.each(s,function(key,val) { здесь, естественно, посылает очень далеко, поскольку undefined<br />
 echo key+&#8221;:&#8221;+val;<br />
 });<br />
 });</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Алексей</title>
		<link>http://anton.shevchuk.name/javascript/jquery-for-beginners-ajax/comment-page-3/#comment-62906</link>
		<dc:creator>Алексей</dc:creator>
		<pubDate>Tue, 11 Oct 2011 20:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://anton.shevchuk.name/?p=522#comment-62906</guid>
		<description>Подскажите пожалуйста как очистить значение формы после отправки данных методом POST... 
Запрос на отправку данных без перегрузки страницы работает, но после добавления не обнуляется форма.. =(</description>
		<content:encoded><![CDATA[<p>Подскажите пожалуйста как очистить значение формы после отправки данных методом POST&#8230;<br />
Запрос на отправку данных без перегрузки страницы работает, но после добавления не обнуляется форма.. =(</p>
]]></content:encoded>
	</item>
</channel>
</rss>

