<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Casual Rumblings - jQuery</title>
			<link>http://www.christopherchin.com/blog/index.cfm</link>
			<description>This is personal blog of a Coldfusion programmer but not limited to just geek stuff.</description>
			<language>en-us</language>
			<pubDate>Wed, 08 Sep 2010 02:15:03 -0700</pubDate>
			<lastBuildDate>Thu, 25 Mar 2010 13:48:00 -0700</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>chris@christopherchin.com</managingEditor>
			<webMaster>chris@christopherchin.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>chris@christopherchin.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			<itunes:image href="" />
			<image>
				<url></url>
				<title>Casual Rumblings</title>
				<link>http://www.christopherchin.com/blog/index.cfm</link>
			</image>
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>HELP: CFC+jquery+JSON</title>
				<link>http://www.christopherchin.com/blog/index.cfm/2010/3/25/HELP-CFCjqueryJSON</link>
				<description>
				
				&lt;p&gt;
Ok, I&apos;ve been at this for a couple of hours now.  I thought I was on the right track, but it looks like I&apos;m still a bit lost :(
&lt;br&gt;&lt;br&gt;
I have a modal login form using jquery and colorbox plugin.
&lt;/p&gt;
&lt;p&gt;
Here is a snippet of my jquery ajax call:
&lt;code&gt;
$j.ajax({
  url: &apos;cfc/security.cfc?method=login&apos;,
  data: datastring,
  dataType: &apos;json&apos;,
  success: function(data) {
  	var response = eval(data);
	console.log(response.MESSAGE);
    $j(&apos;.ajaxMsg&apos;).css({&quot;display&quot;:&quot;block&quot;}).html(data);
    $j.fn.colorbox.resize();
  }
});
&lt;/code&gt;
&lt;br&gt;
When calling this CFC from a URL using the correct parameters, I get this:
&lt;code&gt;{&quot;MESSAGE&quot;:&quot;Verified! Logging in...&quot;,&quot;FNAME&quot;:&quot;John&quot;,&quot;LNAME&quot;:&quot;Smith&quot;,&quot;VALID&quot;:true}
&lt;/code&gt;
This is exactly what I want.
&lt;/p&gt;
&lt;p&gt;
However, when running the ajax call above I get:
&lt;br&gt;
&lt;code&gt;
&lt;wddxPacket version=&apos;1.0&apos;&gt;&lt;header/&gt;&lt;data&gt;&lt;string&gt;{&quot;MESSAGE&quot;:&quot;Verified! Logging in....&quot;,&quot;FNAME&quot;:&quot;John&quot;,&quot;LNAME&quot;:&quot;Smith&quot;,&quot;VALID&quot;:true}&lt;/string&gt;&lt;/data&gt;&lt;/wddxPacket&gt;
&lt;/code&gt;
&lt;br&gt;
&lt;br&gt;
And this is screwing me up.
&lt;/p&gt;
&lt;p&gt;
Here is my CFC snippet:
&lt;code&gt;
&lt;CFFUNCTION name=&quot;login&quot; access=&quot;remote&quot; returntype=&quot;string&quot; output=&quot;false&quot;&gt;
    &lt;cfargument name=&quot;username&quot; type=&quot;string&quot; required=&quot;Yes&quot;&gt;
    &lt;cfargument name=&quot;password&quot; type=&quot;string&quot; required=&quot;Yes&quot;&gt;
    &lt;cfargument name=&quot;stayLogged&quot; type=&quot;string&quot; required=&quot;no&quot; default=&quot;no&quot;&gt;
	
    &lt;CFSET myReturn = {}&gt;
    .... sql statements ...
    if valid
    &lt;cfset myReturn.valid = &quot;true&quot;&gt;
    &lt;cfset myReturn.fname = #getLogin.fname#&gt;
    &lt;cfset myReturn.lname = #getLogin.lname#&gt;
    &lt;cfset myReturn.message = &quot;Verified! Logging in....&quot;&gt;
    
    if invalid
    &lt;cfset myReturn.valid = &quot;false&quot;&gt;
    &lt;cfset myReturn.fname = &quot;&quot;&gt;
    &lt;cfset myReturn.lname = &quot;&quot;&gt;
    &lt;cfset myReturn.message = &quot;Unverified! Please try signing in again.&quot;&gt;

    &lt;cfset myReturn = serializeJSON(myReturn)&gt;
	
    &lt;cfreturn myReturn&gt;
&lt;/cffunction&gt;
&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
Ok...what am I doing wrong? :(
&lt;/p&gt; 
				</description>
				
				<category>Ajax</category>				
				
				<category>Web20</category>				
				
				<category>Coldfusion</category>				
				
				<category>jQuery</category>				
				
				<pubDate>Thu, 25 Mar 2010 13:48:00 -0700</pubDate>
				<guid>http://www.christopherchin.com/blog/index.cfm/2010/3/25/HELP-CFCjqueryJSON</guid>
				
			</item>
			
			<item>
				<title>jquery ajax + xml + IE = hair loss</title>
				<link>http://www.christopherchin.com/blog/index.cfm/2009/10/26/jquery-ajax--xml--IE--hair-loss</link>
				<description>
				
				I&apos;ve done ajax before with jQuery with good results on all browsers...until
&lt;br&gt;&lt;br&gt;
I used an XML return with IE (all IE&apos;s that is).
&lt;br&gt;&lt;br&gt;
When returning XML from a CFC (or any other server-side script), IE doesn&apos;t treat the XML document as, well, XML.
&lt;br&gt;&lt;br&gt;
It actually barfs on it unless you tell it to load up the ActiveX control to parse your XML doc. (psst..Thanks Microsoft).
&lt;br&gt;&lt;br&gt;
Just look at this:
&lt;code&gt;
$.ajax({
type: &quot;POST&quot;,
url: &quot;ajaxtest.cfc?method=getallblogs&quot;,
data: datastring,
success: function(data) {
var xml;
if ( $.browser.msie ) {
xml = new ActiveXObject(&quot;Microsoft.XMLDOM&quot;);
xml.async = false;
xml.loadXML(data);
} else {
xml = data;
}
$(xml).find(&apos;blog&apos;).each(function(){
var id = $(this).attr(&apos;id&apos;);
var title = $(this).find(&apos;name&apos;).text();
var url = $(this).find(&apos;url&apos;).text();
$(&apos;&lt;div class=&quot;items&quot; id=&quot;link_&apos;+id+&apos;&quot;&gt;&lt;/div&gt;&apos;).html(&apos;&lt;a href=&quot;&apos;+url+&apos;&quot;&gt;&apos;+title+&apos;&lt;/a&gt;&apos;).appendTo(&apos;#blogInfo&apos;);
});
}
});
&lt;/code&gt;
&lt;br&gt;&lt;br&gt;
See that little blurb in the ajax call for &quot;if ($.browser.msie)&quot;?  That&apos;s the call you&apos;ll need to do to make IE behave like 99% of the other browsers out there.
&lt;br&gt;&lt;br&gt;
I&apos;ve put together a short demo.  I know the code is duplicated, but this is for demo purposes.  Hope this helps you guys doing XML data returns.
&lt;br&gt;&lt;br&gt;
Oh and once again &quot;Thank you Microsoft&quot; for making my web development career such a wild adventure.
&lt;br&gt;&lt;br&gt;
&lt;a href=&quot;http://www.christopherchin.com/blog/demos/jquery/jqueryxmlajax.cfm&quot; target=&quot;_blank&quot;&gt;XML data return demo&lt;/a&gt;
&lt;br&gt;&lt;br&gt;
p.s. the data returned is from my blackberry bloggers site.  If you&apos;re a blackberry fan, check it out (&lt;a href=&quot;http://www.blackberrybloggers.org&quot;&gt;http://www.blackberrybloggers.org&lt;/a&gt;).  It might look a bit familiar :) 
				</description>
				
				<category>Ajax</category>				
				
				<category>Web20</category>				
				
				<category>Rants/Raves</category>				
				
				<category>Coldfusion</category>				
				
				<category>Javascript</category>				
				
				<category>jQuery</category>				
				
				<category>Microsoft</category>				
				
				<pubDate>Mon, 26 Oct 2009 12:01:00 -0700</pubDate>
				<guid>http://www.christopherchin.com/blog/index.cfm/2009/10/26/jquery-ajax--xml--IE--hair-loss</guid>
				
			</item>
			
			<item>
				<title>SVN/CVS:  Any good Commit Comment templates?</title>
				<link>http://www.christopherchin.com/blog/index.cfm/2009/5/8/SVNCVS--Any-good-Commit-Comment-templates</link>
				<description>
				
				We&apos;re implementing SVN in our office and well, things are well under way.
&lt;br&gt;&lt;br&gt;
However, people are going to start committing their changes in various ways.  So reading commits from multiple developers (might) prove to be confusing.
&lt;br&gt;&lt;br&gt;
I was playing around with SVN for eclipse and it&apos;s got a great feature called, &quot;Commit Templates&quot;.
&lt;br&gt;&lt;br&gt;
Being new, I created 2 templates for myself and was thinking about making Commit Templates a standard among the developers.
&lt;br&gt;&lt;br&gt;
Here&apos;s what I made up so far:
&lt;br&gt;&lt;br&gt;
&lt;b&gt;=BUG FIX=&lt;/b&gt;
&lt;br&gt;&lt;br&gt;
&lt;b&gt;Bug Description:&lt;/b&gt;
&lt;br&gt;&lt;br&gt;
&lt;b&gt;Fix:&lt;/b&gt;
&lt;br&gt;&lt;br&gt;
&lt;b&gt;Project:&lt;/b&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;b&gt;=NEW FEATURE=&lt;/b&gt;
&lt;br&gt;&lt;br&gt;
&lt;b&gt;Description:&lt;/b&gt;
&lt;br&gt;&lt;br&gt;
&lt;b&gt;Project:&lt;/b&gt;
&lt;br&gt;&lt;br&gt;
&lt;br&gt;
Again, these are just for me.  I was wondering if anyone else has any other templates that you use and like?
&lt;br&gt;&lt;br&gt;
Thanks! 
				</description>
				
				<category>Spry</category>				
				
				<category>Web20</category>				
				
				<category>SVN/CVS</category>				
				
				<category>CSS</category>				
				
				<category>Coldfusion</category>				
				
				<category>Javascript</category>				
				
				<category>jQuery</category>				
				
				<pubDate>Fri, 08 May 2009 11:11:00 -0700</pubDate>
				<guid>http://www.christopherchin.com/blog/index.cfm/2009/5/8/SVNCVS--Any-good-Commit-Comment-templates</guid>
				
			</item>
			
			<item>
				<title>jQuery + ajax + logout form</title>
				<link>http://www.christopherchin.com/blog/index.cfm/2009/3/24/jQuery--ajax--logout-form</link>
				<description>
				
				I love jquery! Let me just say that now.  I&apos;m a true convert from prototype/scriptaculous.  I love prototype for all it&apos;s pros.  But, I can&apos;t deny the support from the jQuery community and the momentum it has in the web world.
&lt;br&gt;&lt;br&gt;
With that said, I dove in and started playing around with the jQuery UI plugin (built by the jQuery guys of course).  The dialog plug in is simply DOPE!! (is that a youngin&apos; term?)
&lt;br&gt;&lt;br&gt;
I was playing around with a logout confirmation dialog and here&apos;s what I&apos;ve come up with.  It&apos;s a bit verbose for my taste and by NO means the best way to do this.  But, I do hope it points people in the right direction if they&apos;re looking to do something like this.
&lt;br&gt;&lt;br&gt;
&lt;code&gt;
$(&apos;#logout&apos;).click(
		function(e){
		e.preventDefault();
		
        $(&apos;&lt;div id=&quot;confirmLogout&quot; title=&quot;Logout?&quot;&gt;Are you sure you want to log out?&lt;/div&gt;&apos;).dialog(
			{
			modal: true,
			height: 100, 
			width:350,
			show:&quot;blind&quot;,
			hide: &quot;blind&quot;,
			buttons:{
				&quot;Yes&quot;:function() {
					$.ajax({ 
						url: &apos;someActionCall.cfm&apos;, 
						complete: function() {
							$(&apos;#confirmLogout&apos;).html(&quot;See you next time!&quot;);
							$(&apos;.ui-dialog-buttonpane&apos;).css(&apos;display&apos;,&apos;none&apos;);
							var dlg = $(&quot;#confirmLogout&quot;).parents(&quot;.ui-dialog:first&quot;);
							dlg.animate({ width: 200},50);
							setTimeout(function(){$(&quot;#confirmLogout&quot;).dialog(&quot;close&quot;)},3000);
							setTimeout(function(){location.reload();},1500);	
							} 
						});
					},
				&quot;No&quot;:function() {
					$(&quot;#confirmLogout&quot;).dialog(&quot;close&quot;);
					}
			},
			close:function(){
				 $(&quot;#confirmLogout&quot;).remove();
			}
			});

        return false; 
	});
&lt;/code&gt;
&lt;br&gt;&lt;br&gt;
The demo can be found here:  &lt;a href=&quot;http://www.christopherchin.com/blog/demos/jquery/jquerydialog.html&quot; target=&quot;_blank&quot;&gt;Logout demo&lt;/a&gt; 
				</description>
				
				<category>Ajax</category>				
				
				<category>Web20</category>				
				
				<category>Rants/Raves</category>				
				
				<category>Javascript</category>				
				
				<category>jQuery</category>				
				
				<pubDate>Tue, 24 Mar 2009 13:17:00 -0700</pubDate>
				<guid>http://www.christopherchin.com/blog/index.cfm/2009/3/24/jQuery--ajax--logout-form</guid>
				
			</item>
			</channel></rss>