<?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: Auto-saving with jQuery</title>
	<atom:link href="http://jetlogs.org/2007/11/11/auto-saving-with-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/</link>
	<description>Web development, tutorials, video games, papercraft, and technology</description>
	<lastBuildDate>Wed, 25 Apr 2012 10:43:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: joe</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-3054</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Fri, 10 Feb 2012 04:45:53 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-3054</guid>
		<description>This is very helpful, it takes only 10 mins to implement! wonderful post! :D</description>
		<content:encoded><![CDATA[<p>This is very helpful, it takes only 10 mins to implement! wonderful post! <img src='http://jetlogs.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: What's intaglioing or nonhistorical</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-3026</link>
		<dc:creator>What's intaglioing or nonhistorical</dc:creator>
		<pubDate>Sat, 07 Jan 2012 06:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-3026</guid>
		<description>[...]  [...]</description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bunthan</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2944</link>
		<dc:creator>Bunthan</dc:creator>
		<pubDate>Wed, 21 Sep 2011 03:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2944</guid>
		<description>Thanks very helpful for me..........</description>
		<content:encoded><![CDATA[<p>Thanks very helpful for me&#8230;&#8230;&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malith</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2941</link>
		<dc:creator>Malith</dc:creator>
		<pubDate>Sat, 17 Sep 2011 18:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2941</guid>
		<description>Thank you.. This was very helpful..!!</description>
		<content:encoded><![CDATA[<p>Thank you.. This was very helpful..!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ravi Kumar</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2855</link>
		<dc:creator>Ravi Kumar</dc:creator>
		<pubDate>Wed, 15 Jun 2011 07:00:06 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2855</guid>
		<description>Hi,

   First of all I want to say thanks to you, because this article helped me a lot. Keep posting like these

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>   First of all I want to say thanks to you, because this article helped me a lot. Keep posting like these</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bulsionvili</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2736</link>
		<dc:creator>Bulsionvili</dc:creator>
		<pubDate>Tue, 28 Sep 2010 03:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2736</guid>
		<description>&lt;a href=&quot;http://financialstaff.ru/?cat=11&quot; rel=&quot;nofollow&quot;&gt;Руководитель
&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p><a href="http://financialstaff.ru/?cat=11" rel="nofollow">Руководитель<br />
</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donna</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2729</link>
		<dc:creator>Donna</dc:creator>
		<pubDate>Wed, 15 Sep 2010 08:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2729</guid>
		<description>I wonder jQuery has an important role in making the article of the sites. &lt;a href=&quot;http://www.justfunctions.com.au/&quot; rel=&quot;nofollow&quot;&gt; Melbourne Functions &lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I wonder jQuery has an important role in making the article of the sites. <a href="http://www.justfunctions.com.au/" rel="nofollow"> Melbourne Functions </a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russ</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2722</link>
		<dc:creator>Russ</dc:creator>
		<pubDate>Fri, 20 Aug 2010 19:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2722</guid>
		<description>One other comment in case anyone is trying to find out an answer.  I ran into a problem with posting PHP content through this form with loops and incremented variables.  The plus sings (+) weren&#039;t being encoded.  The escape() function does not encode the following characters {* @ - _ + . /}.  Thus it was crashing my scripts that were in the form field.  Although it&#039;s not entirely fail-safe, the function encodeURIComponent() worked out just fine for me.

So instead of using:
&quot;&amp;title=&quot; + escape(title)

Use:
&quot;&amp;title=&quot; + encodeURIComponent(title)</description>
		<content:encoded><![CDATA[<p>One other comment in case anyone is trying to find out an answer.  I ran into a problem with posting PHP content through this form with loops and incremented variables.  The plus sings (+) weren&#8217;t being encoded.  The escape() function does not encode the following characters {* @ &#8211; _ + . /}.  Thus it was crashing my scripts that were in the form field.  Although it&#8217;s not entirely fail-safe, the function encodeURIComponent() worked out just fine for me.</p>
<p>So instead of using:<br />
&#8220;&amp;title=&#8221; + escape(title)</p>
<p>Use:<br />
&#8220;&amp;title=&#8221; + encodeURIComponent(title)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russ</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2718</link>
		<dc:creator>Russ</dc:creator>
		<pubDate>Tue, 10 Aug 2010 07:24:18 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2718</guid>
		<description>whoops, the IMG tag disappeared. it was just a basic image tag with basic attributes. nothing special.</description>
		<content:encoded><![CDATA[<p>whoops, the IMG tag disappeared. it was just a basic image tag with basic attributes. nothing special.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russ</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2717</link>
		<dc:creator>Russ</dc:creator>
		<pubDate>Tue, 10 Aug 2010 07:21:46 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2717</guid>
		<description>I&#039;m new to AJAX and wanted an autosave script for a CMS I am developing.  This worked out fine for me.  I also included a loading image when the ajax call is processed.  Took me a minute to figure that out.

It was a lot easier than I thought it was going to be. I simply rewrote the html of the #timestamp with an image and text just before the  call.

...
$(&quot;#timestamp&quot;).html(&quot; Saving page data...&quot;);

$.ajax({
...

Thanks for the great script!</description>
		<content:encoded><![CDATA[<p>I&#8217;m new to AJAX and wanted an autosave script for a CMS I am developing.  This worked out fine for me.  I also included a loading image when the ajax call is processed.  Took me a minute to figure that out.</p>
<p>It was a lot easier than I thought it was going to be. I simply rewrote the html of the #timestamp with an image and text just before the  call.</p>
<p>&#8230;<br />
$(&#8220;#timestamp&#8221;).html(&#8221; Saving page data&#8230;&#8221;);</p>
<p>$.ajax({<br />
&#8230;</p>
<p>Thanks for the great script!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Coupland</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2668</link>
		<dc:creator>Nick Coupland</dc:creator>
		<pubDate>Thu, 20 May 2010 02:47:31 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2668</guid>
		<description>Hi just wondering if you know of a way to integrate this with tinyMCE. For some reason when i enable the tinyMCE script the autosave no longer pushes the content in the textarea to the database. Every other input field is fine, its only the tinyMCE one that is affected.
Thanks
Nick</description>
		<content:encoded><![CDATA[<p>Hi just wondering if you know of a way to integrate this with tinyMCE. For some reason when i enable the tinyMCE script the autosave no longer pushes the content in the textarea to the database. Every other input field is fine, its only the tinyMCE one that is affected.<br />
Thanks<br />
Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Natan</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2639</link>
		<dc:creator>Natan</dc:creator>
		<pubDate>Fri, 05 Mar 2010 12:20:19 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2639</guid>
		<description>Thanks, 

Very simple and easy to implement!</description>
		<content:encoded><![CDATA[<p>Thanks, </p>
<p>Very simple and easy to implement!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vikas Tharyani</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2631</link>
		<dc:creator>Vikas Tharyani</dc:creator>
		<pubDate>Mon, 15 Feb 2010 09:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2631</guid>
		<description>I have a table which have the following fields 
deck_date
deck_id
user_id
deck_name
school
course
professor
type_deck
subtype_deck
special_note
status
timestamp

when i try to autosave using the above Jquery, autosave.php, and add_articel.php, the problem i am facing is that i get only the timestamp value correct rest nothing is stored in the table named deck
in place of add_article.php i have a file named createflashacrd.php in which i have following text fields
school
course
professor
type_deck
subtype_deck
special_note
status</description>
		<content:encoded><![CDATA[<p>I have a table which have the following fields<br />
deck_date<br />
deck_id<br />
user_id<br />
deck_name<br />
school<br />
course<br />
professor<br />
type_deck<br />
subtype_deck<br />
special_note<br />
status<br />
timestamp</p>
<p>when i try to autosave using the above Jquery, autosave.php, and add_articel.php, the problem i am facing is that i get only the timestamp value correct rest nothing is stored in the table named deck<br />
in place of add_article.php i have a file named createflashacrd.php in which i have following text fields<br />
school<br />
course<br />
professor<br />
type_deck<br />
subtype_deck<br />
special_note<br />
status</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jetlogs</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2478</link>
		<dc:creator>Jetlogs</dc:creator>
		<pubDate>Mon, 20 Apr 2009 03:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2478</guid>
		<description>@J-F Lacrampe:

The approach for that one would be to check first whether the user input is not empty before creating a row in the database. However, the article_id will instead be stored in the session:

&lt;b&gt;autosave.php&lt;/b&gt;
&lt;pre&gt;&lt;code class=&quot;php&quot;&gt;
if ((!empty($title) &#124;&#124; !empty($content))
{
   if (empty($_SESSION[&#039;article_id&#039;])
   {
      //create new article on database 
      mysql_query(&quot;INSERT INTO `articles`(title, content)
      VALUES($title, $content)&quot;); 
      $_SESSION[&#039;article_id&#039;] = mysql_insert_id();
   }
   else
   {
       mysql_query(&quot;UPDATE `articles` 
       SET title = &#039;$title&#039;, content = &#039;$content&#039; 
       WHERE id = &#039;&quot;.(int)$_SESSION[&#039;article_id&#039;].&quot;&#039;&quot;); 
   }
}&lt;/code&gt;&lt;/pre&gt;

of course for every instance of add_article.php you need to destroy any leftover sessions from previous instances:

&lt;b&gt;add_article.php&lt;/b&gt;
&lt;pre&gt;&lt;code class=&quot;php&quot;&gt;
unset($_SESSION[&#039;article_id&#039;]);
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@J-F Lacrampe:</p>
<p>The approach for that one would be to check first whether the user input is not empty before creating a row in the database. However, the article_id will instead be stored in the session:</p>
<p><b>autosave.php</b></p>
<pre><code class="php">
if ((!empty($title) || !empty($content))
{
   if (empty($_SESSION['article_id'])
   {
      //create new article on database
      mysql_query("INSERT INTO `articles`(title, content)
      VALUES($title, $content)");
      $_SESSION['article_id'] = mysql_insert_id();
   }
   else
   {
       mysql_query("UPDATE `articles`
       SET title = '$title', content = '$content'
       WHERE id = '".(int)$_SESSION['article_id']."'");
   }
}</code></pre>
<p>of course for every instance of add_article.php you need to destroy any leftover sessions from previous instances:</p>
<p><b>add_article.php</b></p>
<pre><code class="php">
unset($_SESSION['article_id']);
</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: J-F Lacrampe</title>
		<link>http://jetlogs.org/2007/11/11/auto-saving-with-jquery/comment-page-1/#comment-2472</link>
		<dc:creator>J-F Lacrampe</dc:creator>
		<pubDate>Thu, 16 Apr 2009 06:05:44 +0000</pubDate>
		<guid isPermaLink="false">http://jetlogs.org/2007/11/11/auto-saving-with-jquery/#comment-2472</guid>
		<description>&quot;There is a more efficient way of implementing this logic without generating a blank row every time, however, for the sake of simplicity and explaining the point of concept for this tutorial, we will skip this part.&quot;

It would be of great help to me to explain the logic behind this – I don&#039;t need the code itself, just an information on how you would do that. Creating a blank row every time is a hassle for me and my users.

Thanks.</description>
		<content:encoded><![CDATA[<p>&#8220;There is a more efficient way of implementing this logic without generating a blank row every time, however, for the sake of simplicity and explaining the point of concept for this tutorial, we will skip this part.&#8221;</p>
<p>It would be of great help to me to explain the logic behind this – I don&#8217;t need the code itself, just an information on how you would do that. Creating a blank row every time is a hassle for me and my users.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

