<?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: Impromptu Demonstrations</title>
	<atom:link href="http://trentrichardson.com/2007/10/28/impromptu-demonstration/feed/" rel="self" type="application/rss+xml" />
	<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/</link>
	<description>practical web design &#38; development</description>
	<lastBuildDate>Mon, 06 Sep 2010 10:21:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Ethan From Malaysia</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-10131</link>
		<dc:creator>Ethan From Malaysia</dc:creator>
		<pubDate>Thu, 26 Mar 2009 06:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-10131</guid>
		<description>oops.. for vars.php, simply echo false then the callback will get the respond</description>
		<content:encoded><![CDATA[<p>oops.. for vars.php, simply echo false then the callback will get the respond</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ethan From Malaysia</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-10130</link>
		<dc:creator>Ethan From Malaysia</dc:creator>
		<pubDate>Thu, 26 Mar 2009 06:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-10130</guid>
		<description>Hi, Trent, this is the correct callback function to use after my test 

$.post(&quot;vars.php&quot;, { userid: uid }, function(data) { 
if(data == &#039;true&#039;)								{alert(data);}
								else{ $.prompt(&#039;An Error Occured while removing this user&#039;); }	
								});

Sample vars.php



Hope this help someone. :)</description>
		<content:encoded><![CDATA[<p>Hi, Trent, this is the correct callback function to use after my test </p>
<p>$.post(&#8220;vars.php&#8221;, { userid: uid }, function(data) {<br />
if(data == &#8216;true&#8217;)								{alert(data);}<br />
								else{ $.prompt(&#8216;An Error Occured while removing this user&#8217;); }<br />
								});</p>
<p>Sample vars.php</p>
<p>Hope this help someone. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trent</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-3944</link>
		<dc:creator>trent</dc:creator>
		<pubDate>Fri, 29 Feb 2008 13:46:46 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-3944</guid>
		<description>Hey Martin,

the $.post will call the php file:
$.post(&#039;removeuser.php&#039;,{userid:uid}, callback:function(data){

then in the call back the &quot;data&quot; function parameter will have the output of the php file, so within your php file if the action is successful you can do echo &quot;true&quot;; or echo &quot;false&quot;; if the action is not successful. For this script it is only looking for a one word response.  You could however create xml, but then you will need to parse it on the jquery side.  I was shooting for the simplest possible example.</description>
		<content:encoded><![CDATA[<p>Hey Martin,</p>
<p>the $.post will call the php file:<br />
$.post(&#8216;removeuser.php&#8217;,{userid:uid}, callback:function(data){</p>
<p>then in the call back the &#8220;data&#8221; function parameter will have the output of the php file, so within your php file if the action is successful you can do echo &#8220;true&#8221;; or echo &#8220;false&#8221;; if the action is not successful. For this script it is only looking for a one word response.  You could however create xml, but then you will need to parse it on the jquery side.  I was shooting for the simplest possible example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Sarsini</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-3934</link>
		<dc:creator>Martin Sarsini</dc:creator>
		<pubDate>Fri, 29 Feb 2008 09:04:50 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-3934</guid>
		<description>Trent, can I ask you how can I get the php file to send back data to the original script?

// if($.trim(data) == &#039;true&#039;) {</description>
		<content:encoded><![CDATA[<p>Trent, can I ask you how can I get the php file to send back data to the original script?</p>
<p>// if($.trim(data) == &#8216;true&#8217;) {</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trent</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-3562</link>
		<dc:creator>trent</dc:creator>
		<pubDate>Fri, 22 Feb 2008 14:21:30 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-3562</guid>
		<description>It could be a difference in versions of jQuery, that example runs on 1.2.1.  It&#039;s getting about time for me to update the examples again.</description>
		<content:encoded><![CDATA[<p>It could be a difference in versions of jQuery, that example runs on 1.2.1.  It&#8217;s getting about time for me to update the examples again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Sarsini</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-3559</link>
		<dc:creator>Martin Sarsini</dc:creator>
		<pubDate>Fri, 22 Feb 2008 13:19:02 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-3559</guid>
		<description>Hi Trent
I am getting an error exactly on that line and on the click of the &quot;delete&quot; nothing happens at all apart from receiving an error.

I removed callback: leaving just function(data) and it works great.
I am using jquery 1.2.3</description>
		<content:encoded><![CDATA[<p>Hi Trent<br />
I am getting an error exactly on that line and on the click of the &#8220;delete&#8221; nothing happens at all apart from receiving an error.</p>
<p>I removed callback: leaving just function(data) and it works great.<br />
I am using jquery 1.2.3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trent</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-3557</link>
		<dc:creator>trent</dc:creator>
		<pubDate>Fri, 22 Feb 2008 12:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-3557</guid>
		<description>Hey Martin,

I have that commented out since I didn&#039;t write the php side to the script.  If you&#039;re trying to get the php side to work then be sure you&#039;re printing out &quot;true&quot; or &quot;false&quot; from the php.  Also you might want to add $.trim() to that if statement:

$.post(&#039;removeuser.php&#039;,{userid:uid}, callback:function(data){
    if($.trim(data) == &#039;true&#039;){...</description>
		<content:encoded><![CDATA[<p>Hey Martin,</p>
<p>I have that commented out since I didn&#8217;t write the php side to the script.  If you&#8217;re trying to get the php side to work then be sure you&#8217;re printing out &#8220;true&#8221; or &#8220;false&#8221; from the php.  Also you might want to add $.trim() to that if statement:</p>
<p>$.post(&#8216;removeuser.php&#8217;,{userid:uid}, callback:function(data){<br />
    if($.trim(data) == &#8216;true&#8217;){&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Sarsini</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-3555</link>
		<dc:creator>Martin Sarsini</dc:creator>
		<pubDate>Fri, 22 Feb 2008 12:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-3555</guid>
		<description>something wrong here I suppose...
$.post(&#039;removeuser.php&#039;,{userid:uid}, callback:function(data){</description>
		<content:encoded><![CDATA[<p>something wrong here I suppose&#8230;<br />
$.post(&#8216;removeuser.php&#8217;,{userid:uid}, callback:function(data){</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trent</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-2462</link>
		<dc:creator>trent</dc:creator>
		<pubDate>Mon, 14 Jan 2008 13:01:16 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-2462</guid>
		<description>Hey Bryan,

It looks like in your editPrompt() your id for editname is wrong, one says editproduct(prompt text), the other says editname(in the submit validation). Hope that helps!  Looks good!

Trent</description>
		<content:encoded><![CDATA[<p>Hey Bryan,</p>
<p>It looks like in your editPrompt() your id for editname is wrong, one says editproduct(prompt text), the other says editname(in the submit validation). Hope that helps!  Looks good!</p>
<p>Trent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://trentrichardson.com/2007/10/28/impromptu-demonstration/comment-page-1/#comment-2460</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Mon, 14 Jan 2008 09:59:14 +0000</pubDate>
		<guid isPermaLink="false">http://trentrichardson.com/?p=29#comment-2460</guid>
		<description>Hey there. Before I show this keep in mind I&#039;m a total newbie at Javascript.  But I copied your code and modified it slightly, and am having a TON of trouble getting the edit function to do anything.  

http://cosmeticalchemy.com/retailers/dashboard.php

Any help you could give on why the submission on edit is not going through would be GREATLY appreciated.  Just click on the first product name.  

Thank you SOOOOO much.

Bryan</description>
		<content:encoded><![CDATA[<p>Hey there. Before I show this keep in mind I&#8217;m a total newbie at Javascript.  But I copied your code and modified it slightly, and am having a TON of trouble getting the edit function to do anything.  </p>
<p><a href="http://cosmeticalchemy.com/retailers/dashboard.php" rel="nofollow">http://cosmeticalchemy.com/retailers/dashboard.php</a></p>
<p>Any help you could give on why the submission on edit is not going through would be GREATLY appreciated.  Just click on the first product name.  </p>
<p>Thank you SOOOOO much.</p>
<p>Bryan</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.430 seconds -->
