<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Anurag Bhandari</title>
	
	<link>http://www.anuragbhandari.com</link>
	<description>Impossibilities Recede As Experience Advances</description>
	<lastBuildDate>Tue, 10 Nov 2009 07:18:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/AnuragBhandariBlog" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Updates</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/rq2Q8O-w3fc/</link>
		<comments>http://www.anuragbhandari.com/2009/11/updates-2/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 07:15:54 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[accenture]]></category>
		<category><![CDATA[airtel]]></category>
		<category><![CDATA[bsnl]]></category>
		<category><![CDATA[evdo]]></category>
		<category><![CDATA[Granular]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://www.anuragbhandari.com/2009/11/updates-2/</guid>
		<description><![CDATA[It&#8217;s been a week now since my Accenture training got over. Now, my real office work has started.
Missing my friends (back in Bangalore) that I made during my Accenture training there.
Waiting desperately to get my hands on an Internet connection at home. I&#8217;ll go with either of Airtel broadband or BSNL EVDO.
My CAT exam is [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a week now since my <a href="http://www.accenture.com">Accenture</a> training got over. Now, my real office work has started.</p>
<p>Missing my friends (back in <strong>Bangalore</strong>) that I made during my Accenture training there.</p>
<p>Waiting desperately to get my hands on an Internet connection at home. I&#8217;ll go with either of <a href="http://airtelbroadband.in">Airtel broadband</a> or <a href="http://bsnl.co.in/service/internet_on_cdma.htm">BSNL EVDO</a>.</p>
<p>My <a href="http://catiim.in/">CAT exam</a> is on <strong>29th November</strong>. Will be going virtually without preparation. Let&#8217;s see what happens.</p>
<p>Will resume my <a href="http://www.granularproject.org/">Granular</a> development as soon as I get an Internet connection. Meanwhile, the <a href="http://unity-linux.org">Unity Project</a> has been going good, as it would seem.</p>
<p>After losing their bilateral <strong>Cricket</strong> series to Australia, I hope India will perform a lot better in their next series (India vs Sri Lanka), scheduled to start on <strong>16th November</strong>.</p>
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/rq2Q8O-w3fc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/11/updates-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/11/updates-2/</feedburner:origLink></item>
		<item>
		<title>Life without Twitter</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/D06ePe_zivI/</link>
		<comments>http://www.anuragbhandari.com/2009/11/life-without-twitter/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 06:56:50 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[office]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.anuragbhandari.com/2009/11/life-without-twitter/</guid>
		<description><![CDATA[With Twitter blocked in my office (*sigh*), yes, it&#8217;s a tough life without it!  
]]></description>
			<content:encoded><![CDATA[<p>With Twitter blocked in my office (*sigh*), yes, it&#8217;s a tough life without it! <img src='http://www.anuragbhandari.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/D06ePe_zivI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/11/life-without-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/11/life-without-twitter/</feedburner:origLink></item>
		<item>
		<title>.NET at Accenture</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/zfpDQflluqI/</link>
		<comments>http://www.anuragbhandari.com/2009/09/net-at-accenture/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 11:22:47 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[accenture]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.anuragbhandari.com/?p=280</guid>
		<description><![CDATA[Since I landed in Bangalore, my schedule has been extremely busy. Yeah, I had heard in the past that the training period in an IT company, especially Accenture, is very tough, I am experiencing it only now. I have yet to take out some time to go out and explore that grand city that is [...]]]></description>
			<content:encoded><![CDATA[<p>Since I landed in Bangalore, my schedule has been extremely busy. Yeah, I had heard in the past that the training period in an IT company, especially Accenture, is very tough, I am experiencing it only now. I have yet to take out some time to go out and explore that grand city that is Bangalore. Most of my time everyday is spent preparing for in-training tests. But anyway, the first phase of my training ends today, the last test of first phase being on 28th Sept.</p>
<p>A ray of hope in my frustrating daily schedule has to be me getting .NET stream, that is, I would be doing my second (and final) phase of training on Microsoft .NET technologies, and eventually be getting projects based on it. I am curious to begin my stream training, more because my stream is more web-development oriented (yippie!). By the way, it would be ASP.NET + C#.</p>
<p>That&#8217;s all for now. I&#8217;ll try to keep my blog as updated as possible.</p>
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/zfpDQflluqI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/09/net-at-accenture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/09/net-at-accenture/</feedburner:origLink></item>
		<item>
		<title>Going to begin a new life</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/hDKz8Xr7S90/</link>
		<comments>http://www.anuragbhandari.com/2009/08/going-to-begin-a-new-life/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 19:15:21 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[accenture]]></category>
		<category><![CDATA[Bangalore]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[joining]]></category>

		<guid isPermaLink="false">http://www.anuragbhandari.com/?p=273</guid>
		<description><![CDATA[I got my Accenture (India) joining letter last week, the thing I had been waiting for so long. I am going to join Accenture on the 31st of August 2009 in Bangalore. And contrary to many predictions that Accenture joining for new recruits would be delayed this year due to the global economic recession, we [...]]]></description>
			<content:encoded><![CDATA[<p>I got my <a href="http://www.accenture.com/Countries/India/default.htm">Accenture</a> (India) joining letter last week, the thing I had been waiting for so long. I am going to join Accenture on the <strong>31st of August 2009</strong> in <strong>Bangalore</strong>. And contrary to many predictions that Accenture joining for new recruits would be delayed this year due to the global economic recession, we (me and my college mates) got it on time. But well, I still feel like wishing we had gotten the joining letter a bit later. Maybe that&#8217;s because this is the first time I am going to step out of my home for long. So although I am very excited about beginning my first job, I am going to sourly miss the comfort of my home at the same time.</p>
<p>In all probability, during my initial days at office, I would be without an Internet connection (damn!), a TV (where would I watch sports?), my (sweet) PC, a fridge (?), and many more of those comforts at wherever I get to live. On the other hand, some things to cheer about include the pleasant weather of Bangalore and the company of few of my college friends.</p>
<p>I hope it all goes well in Bangalore. With this, I wish myself good luck in my quest to begin a new life. <img src='http://www.anuragbhandari.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/hDKz8Xr7S90" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/08/going-to-begin-a-new-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/08/going-to-begin-a-new-life/</feedburner:origLink></item>
		<item>
		<title>Tutorial: AJAX with jQuery</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/CVMyn45cK_M/</link>
		<comments>http://www.anuragbhandari.com/2009/07/tutorial-ajax-with-jquery/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 08:51:34 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Web Developement]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.anuragbhandari.com/?p=238</guid>
		<description><![CDATA[jQuery is a very powerful JavaScript framework, and to put in their own terms,  is  The Write Less, Do More JavaScript library.  jQuery&#8217;s slogan indeed holds true to its claim, as you&#8217;ll discover as soon as you start coding using jQuery. Although jQuery has an extensive set of API and a collection [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a title="jQuery website" href="http://jquery.com/" target="_blank">jQuery</a></strong> is a very powerful JavaScript framework, and to put in their own terms,  is  <em>The Write Less, Do More</em> JavaScript library.  jQuery&#8217;s slogan indeed holds true to its claim, as you&#8217;ll discover as soon as you start coding using jQuery. Although jQuery has an extensive set of API and a collection of many functions in its arsenal, I would be concentrating more on the AJAX capabilities of jQuery in this tutorial.</p>
<p>Most of the modern websites, irrespective of whether they offer a simple or a complex interface, usually use AJAX for some task or the other. While designing in order to cater to today&#8217;s needs, it becomes almost indispensable to use AJAX to make the end-user experience faster and more pleasant. So, if you had been deferring the use of AJAX till now owing to it&#8217;s complexity in raw JavaScript, here is your chance to start using it with utmost ease.</p>
<p>It is really amazing to see how much simplified AJAX is with jQuery. The developers have seemingly (and painstakingly) done a lot of hard work behind the scenes to make it easy for the web developer to implement even the most complex JavaScript concepts, including AJAX.</p>
<p>For the purpose of demostrating AJAX, I&#8217;ll be making use of a simple web application (that I designed using <strong>HTML</strong>, <strong>PHP</strong>, <strong>jQuery</strong>, <strong>CSS</strong> and <strong>MySQL</strong>). I call it the <a title="Albums Database" href="http://www.anuragbhandari.com/sc/albums/">Albums Database</a>.</p>
<p><span id="more-238"></span></p>
<h2>index.html</h2>
<p>This is the main page, the page the the end-user is going to see. Below is the complete code for this page, and even below that is a brief explanation of it.</p>
<p>We start with the &lt;head&gt; tag. First, we mention all the external scripts and stylesheets that we are going to use with our page. The scripts include a  latest copy of <strong>jQuery</strong> JS file, <strong>jQuery UI</strong> (optional), <strong>AjaxUpload</strong> plugin for jQuery, and our own <strong>custom</strong> JS file. The stylesheets include our own CSS code and jQuery UI&#8217;s CSS file (optional).</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
     <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=iso-8859-1&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Albums Database<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
	  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/jquery-1.3.2.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
	  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/jquery-ui-1.7.2.custom.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
	  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/ajaxupload.3.5.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
	  <span style="color: #808080; font-style: italic;">&lt;!-- Custom JS code that utilizes APIs of some other JS file (jQuery in our case)</span>
<span style="color: #808080; font-style: italic;">		 should be referred to in the head section after the file containing APIs --&gt;</span>
	   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/javascript.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
	   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/ui-lightness/jquery-ui-1.7.2.custom.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Stylesheet&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/style.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Stylesheet&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;block&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;color: white; background-color: purple; padding: 20px; margin:0;&quot;</span>&gt;</span>
		Welcome to Albums database.
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;new_album&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>New Album<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;new_album_form&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;background: #F3F4BA; padding: 10px; margin: 10px; display: none;&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100%&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100px&quot;</span>&gt;</span>Name:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;album_name&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100px&quot;</span>&gt;</span>Artist:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;album_artist&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100px&quot;</span>&gt;</span>Year:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;album_year&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100px&quot;</span>&gt;</span>Cover:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;album_cover&quot;</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;loader-2&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;display:none;&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">16</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">16</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;loader-yellow-bg.gif&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Create&quot;</span><span style="color: #66cc66;">/</span>&gt;</span> 
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;loader-3&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;display:none;&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">19</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">220</span> <span style="color: #000066;">align</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;top&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;loader-long.gif&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;create_album_result&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;color:green; display:none;&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
		Search for albums:
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;userinput&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span><span style="color: #66cc66;">/</span>&gt;</span> 
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;loader&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;display:none;&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">16</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">16</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;loader.gif&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;results&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>In the main body, we start by displaying a sweet little header. Below the header is a link <strong>New Album</strong> which, as the name implies, will display a form to create new albums and post them to our database. Below this link is a form that has 4 fields required to be filled to create a new album. By default, this form is hidden and will be shown to the user only after the above link is clicked. After the form, we have a &#8220;search box&#8221; which lets the user search for existing albums in the database, and the searching is automatically done as the user types into this box. The search results are then displayed below the search box. Magic, you say? It&#8217;s AJAX actually.</p>
<h2>javascript.js</h2>
<p>Here comes the main file of our whole web app. This file contains all the code in JavaScript that will be used to control the behavior of various elements present in our index.html page. Of course, we make use of jQuery to write our JS code in it.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></div></div>

<p>The first step is to make sure that index.html has fully loaded in browser of the user before our JS code can be applied to it. This reduces any chances of error or misbehavior on the part of our coding at the user&#8217;s end.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"> <span style="color: #009966; font-style: italic;">/* Convert the input with id 'album_cover' into AJAX uploader */</span>
<span style="color: #003366; font-weight: bold;">new</span> AjaxUpload<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'album_cover'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span> action<span style="color: #339933;">:</span> <span style="color: #3366CC;">'upload.php'</span><span style="color: #339933;">,</span> 
					onChange<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>file<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#loader-2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 
					onSubmit<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>file<span style="color: #339933;">,</span> ext<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>ext <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009966; font-style: italic;">/^(jpg|png|jpeg|gif)$/</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>ext<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
							<span style="color: #006600; font-style: italic;">// extension is not allowed</span>
							<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Error: invalid file extension'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							<span style="color: #006600; font-style: italic;">// cancel upload</span>
							$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#loader-2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
						<span style="color: #009900;">&#125;</span>
				        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 
					onComplete<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>file<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#album_cover'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span>file<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#loader-2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
					<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now, using the <a title="AjaxUpload plugin for jQuery" href="http://valums.com/ajax-upload/" target="_blank">AjaxUpload</a> plugin for jQuery, we <em>associate</em> the functionality of uploading images through AJAX with the <strong>Cover</strong> field of our new album form.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* Show/hide the create new album form when 'New Album' link is clicked */</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#new_album'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#new_album_form'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'fast'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Next, we specify that when the <strong>New Album</strong> link is clicked, the corresponding form should be displayed (with effects) if hidden or hidden if displayed. That is, we <a title="More information about toggle()" href="http://docs.jquery.com/Effects/toggle" target="_blank">toggle</a> the display state of the form.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* Post the entry of the new album into the database, using AJAX, when the form is submitted */</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#new_album_form'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#loader-3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#album_name'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span> <span style="color: #339933;">&amp;&amp;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#album_artist'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009966; font-style: italic;">/^([0-9]{2}|[0-9]{4})$/</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#album_year'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#album_cover'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$.<span style="color: #660066;">post</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;create.php&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>album_name<span style="color: #339933;">:</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#album_name'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> album_artist<span style="color: #339933;">:</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#album_artist'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> album_year<span style="color: #339933;">:</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#album_year'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> album_cover<span style="color: #339933;">:</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#album_cover'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#create_album_result'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'slow'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#loader-3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Please fill in all the details and fill them correctly.<span style="color: #000099; font-weight: bold;">\n</span>Year can be only 2 digits or 4 digits long.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#loader-3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>After that, we specify the code to be executed when the user <a title="More information about submit()" href="http://docs.jquery.com/Events/submit" target="_blank">submits</a> the form. We start by <a title="More information about show()" href="http://docs.jquery.com/Effects/show" target="_blank">unhiding</a> an originally hidden animated &#8216;loader&#8217; image to give the user an illusion of something going on behind the scene (that is, the form submission process starting). Then we put a if condition to check whether all the form fields were filled in and if the <strong>Year</strong> field was filled in correctly (we use regular expressions for this; the year should be 2 or 4 digits long only). If the form was filled up fine, we use the jQuery AJAX method <a title="More information about $.post()" href="http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype" target="_blank">$.post</a> to submit the filled up form into the database. Our handler script in this case if <strong>create.php</strong>. After the form submission process has completed, we again <a title="More information about hide()" href="http://docs.jquery.com/Effects/hide" target="_blank">hide</a> our animated loader image.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* Start searching the database, using AJAX, when the user has typed at least 2 characters */</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#userinput'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keyup</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#loader'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$.<span style="color: #660066;">post</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;search.php&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>searchterm<span style="color: #339933;">:</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#userinput'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#results'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#loader'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#results'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The next part of our JS code deals with the search box. We specify that as soon as the user types in the third character (whatever it be), the <a title="More information about $.post()" href="http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype" target="_blank">$.post</a> method executes, making use of the handler script <strong>search.php</strong> this time. The fetched search results are then displayed in the &lt;div&gt; area with id <strong>results</strong></p>
<h2>search.php</h2>
<p>Takes in just one POST variable called &#8220;searchterm&#8221; and uses it to query our MySQL database to find what the user might be looking for. It then prints the search results, in HTML form.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #666666; font-style: italic;">/* Connect to the database */</span>
	<span style="color: #b1b100;">include</span> <span style="color: #0000ff;">'config.php'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$connection</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$DB_HOST</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$DB_USER</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$DB_PASSWORD</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$DB_NAME</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$connection</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* Query the database for searching */</span>
	<span style="color: #000088;">$search_query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM albums WHERE album_name LIKE '%<span style="color: #006699; font-weight: bold;">$_POST[searchterm]</span>%' OR album_artist LIKE '%<span style="color: #006699; font-weight: bold;">$_POST[searchterm]</span>%' OR album_year LIKE '%<span style="color: #006699; font-weight: bold;">$_POST[searchterm]</span>%'&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$search_result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$search_query</span><span style="color: #009900;">&#41;</span> OR <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* Display the search results */</span>
	<span style="color: #000088;">$counter</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">print</span> <span style="color: #0000ff;">&quot;&lt;table width=<span style="color: #000099; font-weight: bold;">\&quot;</span>100%<span style="color: #000099; font-weight: bold;">\&quot;</span> cellspacing=<span style="color: #000099; font-weight: bold;">\&quot;</span>10px<span style="color: #000099; font-weight: bold;">\&quot;</span> cellpadding=0&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$newArray</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$search_result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// Display alternate gray-white search result entries</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$counter</span><span style="color: #339933;">%</span><span style="color:#800080;">2</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$class</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;gray-box&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$class</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;white-box&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$newArray</span><span style="color: #009900;">&#91;</span>album_name<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$artist</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$newArray</span><span style="color: #009900;">&#91;</span>album_artist<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$year</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$newArray</span><span style="color: #009900;">&#91;</span>album_year<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$cover</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$newArray</span><span style="color: #009900;">&#91;</span>album_cover<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">print</span> <span style="color: #0000ff;">&quot;&lt;tr class=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$class</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">print</span> <span style="color: #0000ff;">&quot;&lt;td valign=<span style="color: #000099; font-weight: bold;">\&quot;</span>top<span style="color: #000099; font-weight: bold;">\&quot;</span> width=<span style="color: #000099; font-weight: bold;">\&quot;</span>100px<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&lt;img width=100 height=100 src=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$cover</span><span style="color: #000099; font-weight: bold;">\&quot;</span> style=<span style="color: #000099; font-weight: bold;">\&quot;</span>float:left;<span style="color: #000099; font-weight: bold;">\&quot;</span>/&gt;&lt;/td&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">print</span> <span style="color: #0000ff;">&quot;&lt;td valign=<span style="color: #000099; font-weight: bold;">\&quot;</span>top<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&lt;b&gt;Name:&lt;/b&gt; <span style="color: #006699; font-weight: bold;">$name</span>&lt;br&gt;&lt;b&gt;Artist:&lt;/b&gt; <span style="color: #006699; font-weight: bold;">$artist</span>&lt;br&gt;&lt;b&gt;Year:&lt;/b&gt; <span style="color: #006699; font-weight: bold;">$year</span>&lt;/td&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">print</span> <span style="color: #0000ff;">&quot;&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$counter</span><span style="color: #339933;">++;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #990000;">print</span> <span style="color: #0000ff;">&quot;&lt;/table&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h2>create.php</h2>
<p>Takes in the four POST variables &#8211; <strong>album_name</strong>, <strong>album_artist,</strong> <strong>album_year</strong> and <strong>album_cover</strong> &#8211; and uses them to create a new entry for the submitted album into our MySQL database.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #666666; font-style: italic;">/* Connect to the database */</span>
	<span style="color: #b1b100;">include</span> <span style="color: #0000ff;">'config.php'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$connection</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$DB_HOST</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$DB_USER</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$DB_PASSWORD</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$DB_NAME</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$connection</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* Values received */</span>
	<span style="color: #666666; font-style: italic;">// mysql_real_escape_string() prepends backslashes to the following characters: \x00, \n, \r, \, ', &quot; and \x1a. </span>
	<span style="color: #000088;">$album_name</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span>album_name<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$album_artist</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span>album_artist<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$album_year</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span>album_year<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$album_cover</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span>album_cover<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* Manipulate the database */</span>
	<span style="color: #000088;">$insert_query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT INTO albums (album_name, album_artist, album_year, album_cover) VALUES ('<span style="color: #006699; font-weight: bold;">$album_name</span>', '<span style="color: #006699; font-weight: bold;">$album_artist</span>', <span style="color: #006699; font-weight: bold;">$album_year</span>, 'images/<span style="color: #006699; font-weight: bold;">$album_cover</span>')&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$insert_result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$insert_query</span><span style="color: #009900;">&#41;</span> OR <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">print</span> <span style="color: #0000ff;">&quot;&lt;br&gt;Album created! &quot;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">print</span> <span style="color: #0000ff;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>javascript:ResetForm();<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Create New&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h2>upload.php</h2>
<p>Simple PHP scripts that handles where and how the files uploaded, using the <strong>Cover</strong> field of the new album form, are placed on the server.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
        <span style="color: #000088;">$uploaddir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'images/'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$uploadfile</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$uploaddir</span> <span style="color: #339933;">.</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'userfile'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">move_uploaded_file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'userfile'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uploadfile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;success&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
  		<span style="color: #666666; font-style: italic;">// WARNING! DO NOT USE &quot;FALSE&quot; STRING AS A RESPONSE!</span>
  		<span style="color: #666666; font-style: italic;">// Otherwise onSubmit event will not be fired</span>
  		<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;error&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h2>config.php</h2>
<p>Included in all our PHP files and stores the variables containing MySQL database information, like DB name, host name, username and password.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// ** MySQL settings ** //</span>
<span style="color: #000088;">$DB_NAME</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;albumdb&quot;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">// The name of the database. albumdb is only an example. So, replace it with the name of your database.</span>
<span style="color: #000088;">$DB_USER</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;username&quot;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">// Your MySQL username. In most cases root works, but it highly not recommended.</span>
<span style="color: #000088;">$DB_PASSWORD</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// ...and password. The default password for root is none.</span>
<span style="color: #000088;">$DB_HOST</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">// 99% chance you won't need to change this value. </span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h2>style.css</h2>
<p>Our custom CSS file. Short and precise.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.yellow-box</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">yellow</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.gray-box</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#efefef</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.white-box</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>albumdb MySQL database</h2>
<p>This is the structure of that database used with this web app, with <strong>albums</strong> as the only table.<br />
<code><br />
album_id - int(11) [ PRIMARY KEY  auto_increment ]<br />
album_name - varchar(100)<br />
album_artist - varchar(100)<br />
album_year - int(4)<br />
album_cover - varchar(100)<br />
</code></p>
<h2>Demo</h2>
<p>Have a look at the final thing (our web app) yourself. <a title="Albums Database" href="http://www.anuragbhandari.com/sc/albums/">The demo is here</a>.</p>
<h2>Download</h2>
<p><a href="http://www.anuragbhandari.com/wp-content/uploads/2009/07/albums.zip">Click here</a> to download the entire web app, excluding the SQL database (you&#8217;ll have to create it yourself based on the structure mentioned above).</p>
<hr />
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/CVMyn45cK_M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/07/tutorial-ajax-with-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/07/tutorial-ajax-with-jquery/</feedburner:origLink></item>
		<item>
		<title>Enabling 3D effects in KDE 4</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/PkjWJTWHxKg/</link>
		<comments>http://www.anuragbhandari.com/2009/07/enabling-3d-effects-in-kde-4/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 19:28:09 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[kde4]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[xorg.conf]]></category>

		<guid isPermaLink="false">http://www.anuragbhandari.com/?p=232</guid>
		<description><![CDATA[KDE 4 comes with it&#8217;s own set of cool 3D effects built-in, but disabled by default. In order to enjoy these effects, you need to enable them manually through the Desktop section of System Settings. But in some cases, enabling 3D can get painfully difficult, as was in my case.
3D can be enabled through one [...]]]></description>
			<content:encoded><![CDATA[<p><strong>KDE 4</strong> comes with it&#8217;s own set of cool 3D effects built-in, but disabled by default. In order to enjoy these effects, you need to enable them manually through the <em>Desktop</em> section of <strong>System Settings</strong>. But in some cases, enabling 3D can get painfully difficult, as was in my case.</p>
<p>3D can be enabled through one of two options &#8211; <strong>XRender</strong> and <strong>OpenGL</strong>. Effects using XRender are quite slow and inferior to what is offered by OpenGL.</p>
<p>Enabling 3D with XRender normally works well on almost all machines, but problems start when you try to enable 3D using OpenGL. The most common error that pops us when trying to do so is:</p>
<blockquote><p>Failed to activate desktop effects using the given configuration options. Settings will be reverted to their previous values</p></blockquote>
<p>Here are some simple steps to make sure you can enable OpenGL 3D effects without errors and problems.</p>
<p>To start with, make sure you have:</p>
<ul>
<li>Proper video drivers installed (<em>proprietary</em> drivers in case of NVIDIA and ATI) and 3D acceleration enabled.</li>
<li>The <strong>xorg.conf</strong> file setup properly.</li>
</ul>
<p>In most situations, these sections are usually missing from the file <em>xorg.conf</em> (found in /etc/X11):</p>

<div class="wp_syntax"><div class="code"><pre class="xorg_conf" style="font-family:monospace;"><span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;Files&quot;</span>
    ModulePath     <span style="color: #0000ff;">&quot;/usr/lib/xorg/modules/extensions/nvidia&quot;</span>
    ModulePath     <span style="color: #0000ff;">&quot;/usr/lib/xorg/modules/extensions&quot;</span>
    ModulePath     <span style="color: #0000ff;">&quot;/usr/lib/xorg/modules&quot;</span>
<span style="color: #b1b100;">EndSection</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xorg_conf" style="font-family:monospace;"><span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;Screen&quot;</span>
    <span style="color: #990000;">Option</span>       <span style="color: #0000ff;">&quot;AddARGBGLXVisuals&quot;</span> <span style="color: #0000ff;">&quot;True&quot;</span>
<span style="color: #b1b100;">EndSection</span></pre></div></div>

<p><span id="more-232"></span></p>

<div class="wp_syntax"><div class="code"><pre class="xorg_conf" style="font-family:monospace;"><span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;Module&quot;</span>
    <span style="color: #990000;">Load</span>           <span style="color: #0000ff;">&quot;glx&quot;</span>
    <span style="color: #990000;">Load</span>           <span style="color: #0000ff;">&quot;dri&quot;</span>
    <span style="color: #990000;">Load</span>           <span style="color: #0000ff;">&quot;extmod&quot;</span>
    <span style="color: #990000;">Load</span>           <span style="color: #0000ff;">&quot;v4l&quot;</span>
<span style="color: #b1b100;">EndSection</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xorg_conf" style="font-family:monospace;"><span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;Extensions&quot;</span>
    <span style="color: #990000;">Option</span>         <span style="color: #0000ff;">&quot;Composite&quot;</span> <span style="color: #0000ff;">&quot;Enable&quot;</span>
<span style="color: #b1b100;">EndSection</span></pre></div></div>

<p>So, make sure to add the above codes to your xorg.conf file. Then go to <strong>System Settings</strong> &gt; <strong>Desktop</strong> &gt; <strong>Desktop Effects</strong>, and enable them using <em>OpenGL</em> compositing settings. <img src='http://www.anuragbhandari.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong><span style="text-decoration: underline;">Extra info about my system:</span></strong><br />
<em>Operating System</em> &#8211; Fedora 11<br />
<em>KDE version</em> &#8211; 4.2.4<br />
<em>NVIDIA driver version</em> &#8211; 185.xx</p>
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/PkjWJTWHxKg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/07/enabling-3d-effects-in-kde-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/07/enabling-3d-effects-in-kde-4/</feedburner:origLink></item>
		<item>
		<title>Updates</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/kBaxAROx5YM/</link>
		<comments>http://www.anuragbhandari.com/2009/06/updates/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 19:10:57 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[updates]]></category>
		<category><![CDATA[cricket]]></category>
		<category><![CDATA[granular linux]]></category>
		<category><![CDATA[recaptcha]]></category>
		<category><![CDATA[toy story]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://anurag.granularproject.org/?p=224</guid>
		<description><![CDATA[I had been tweeting more than blogging these days. But anyway, I had been publishing what I want to say quite regularly.
Frustrated of getting tonnes of spam on the Granular Package Archive everyday, I finally fixed the issue today, once and for all. This had been a long time pending task. I did this by [...]]]></description>
			<content:encoded><![CDATA[<p>I had been <a title="My Tweets" href="http://twitter.com/AnuragBhandari">tweeting</a> more than blogging these days. But anyway, I had been publishing what I want to say quite regularly.</p>
<p>Frustrated of getting tonnes of spam on the <a href="http://packages.granularproject.org/" target="_blank">Granular Package Archive</a> everyday, I finally fixed the issue today, once and for all. This had been a long time pending task. I did this by integrating <a href="http://recaptcha.net/plugins/php/" target="_blank">reCaptcha</a>.</p>
<p>Saw <a href="http://www.imdb.com/title/tt0114709/" target="_blank">Toy Story</a> last week. Loved it! My favorite dialog? &#8211; &#8220;To infinity and beyond&#8221;.</p>
<p>India&#8217;s Cricket <a href="http://www.cricinfo.com/wivind2009/content/series/377311.html" target="_blank">tour of West Indies</a> starts just three days from now.</p>
<p>I am missing <a href="http://www.granularproject.org/" target="_blank">Granular</a> development a lot; hopefully I&#8217;ll be able to continue development within a week or so. Meanwhile, the artwork team (<em>Granuminati</em>) had been doing some <a href="http://www.granularproject.org/content/granuminati/" target="_blank">great stuff</a>.</p>
<p>Still reading <a href="http://en.wikipedia.org/wiki/The_Fountainhead" target="_blank">The Fountainhead</a> (by Ayn Rand) since months now. I am a sloooow reader when it comes to philosophy novels. Anyway, I have started with the part 3 of novel based on <em>Gail Wynand</em>.</p>
<p>Finally did the dreaded <a href="http://drupal.org/" target="_blank">Drupal</a> update for <em>granularproject.org</em>.</p>
<p>Power cuts here, in Punjab, are getting worse day-by-day. 7 hour cuts are a norm these days.</p>
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/kBaxAROx5YM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/06/updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/06/updates/</feedburner:origLink></item>
		<item>
		<title>Association with Unity</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/BsGSTubak-0/</link>
		<comments>http://www.anuragbhandari.com/2009/04/association-with-unity/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 12:47:37 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Granular]]></category>
		<category><![CDATA[unity]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pclinuxos]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://anurag.granularproject.org/?p=215</guid>
		<description><![CDATA[As was hinted in a post at Team Granular blog, Granular will now be a part of the Unity Project. Unity is in it&#8217;s beginning stages, but development is already on full swing. The enthusiasm of developers and members can be seen clearly on Unity&#8217;s devel mailing list and its public forum. At this point [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://anurag.granularproject.org/wp-content/uploads/2009/04/kmenu.png"><img class="alignleft size-full wp-image-219" title="Granular Linux" src="http://anurag.granularproject.org/wp-content/uploads/2009/04/kmenu.png" alt="Granular Linux" width="77" height="77" /></a>As was hinted in a <a title="Granular &amp; Unity" href="http://www.granularproject.org/teamblog/2009/04/11/granular-unity/" target="_self">post at Team Granular blog</a>, Granular will now be a part of the <a title="Unity Project homepage" href="http://unity-linux.org/" target="_blank">Unity Project</a>. Unity is in it&#8217;s beginning stages, but development is already on full swing. The enthusiasm of developers and members can be seen clearly on Unity&#8217;s devel mailing list and its <a title="Unity Linux Support Forum" href="http://forum.unity-linux.org/" target="_blank">public forum</a>. At this point of time, I&#8217;ll refrain myself from giving full details about the association of Granular with Unity, but detailed announcements will come out at a later stage. What all I can tell you right now is I am pretty happy with the progress that&#8217;s been going on at Unity and Granular.</p>
<p>One more thing. You see only the Granular logo at the left and no logo of Unity as it&#8217;s still being finalized. But I am sure the creative artwork guys there will come up with something interesting pretty soon.</p>
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/BsGSTubak-0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/04/association-with-unity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/04/association-with-unity/</feedburner:origLink></item>
		<item>
		<title>Apologies accepted</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/KgAlLnJx6_w/</link>
		<comments>http://www.anuragbhandari.com/2009/04/apologies-accepted/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 18:34:04 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Granular]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://anurag.granularproject.org/?p=210</guid>
		<description><![CDATA[Tom (aka Kurakroma and cbar2 on Granular Community Forum) was a very active member of the forum and one of the global mods there too. He used to be the live wire of the forum, and had a very keen mind which he utilized in discovering new things and putting forward questions, and sometimes trying [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Tom</strong> (aka <em>Kurakroma</em> and <em>cbar2</em> on <a href="http://www.granularlinux.com/forum/" target="_blank">Granular Community Forum</a>) was a very active member of the forum and one of the global mods there too. He used to be the live wire of the forum, and had a very keen mind which he utilized in discovering new things and putting forward questions, and sometimes trying to help people facing problems using Granular (or Linux in general). But under some circumstances not known to the Team Granular members, he left the forums quietly; not leaving even a single message of this sudden action of his.</p>
<p>Just recently, some one at the Granular forum put forward a question asking whether we owned the .co.uk domain of Granular Linux, perhaps the British community of Granular (no, we don&#8217;t own any such domain)? On checking which link he was referring to, we were quite surprised to find out there indeed existed a .co.uk domain of Granular.</p>
<p><a title="Granular Linux's UK based site?" href="http://granularlinux.co.uk/" target="_blank">Check it out</a> for yourself. Rest is self-explanatory. Boy, what a way of expressing his regret. Let me assure you Tom, all your apologies are accepted. And all our doors are still open for you. <img src='http://www.anuragbhandari.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/KgAlLnJx6_w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/04/apologies-accepted/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/04/apologies-accepted/</feedburner:origLink></item>
		<item>
		<title>Granular Package Archive</title>
		<link>http://feedproxy.google.com/~r/AnuragBhandariBlog/~3/nCFj6kHylHQ/</link>
		<comments>http://www.anuragbhandari.com/2009/04/granular-package-archive/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 18:05:31 +0000</pubDate>
		<dc:creator>Anurag Bhandari</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Granular]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[unity]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://anurag.granularproject.org/?p=206</guid>
		<description><![CDATA[Continuing my Java learning stint, I started experimenting on RPM packages in the Granular 2008 repository by extracting meta data from them using various Java classes I had written for my on-going college major project. To give a shape (end-user interface) to these leisurely done Java programs, I used my existing project MyBlog to create [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-208" title="rpm_logo" src="http://anurag.granularproject.org/wp-content/uploads/2009/04/rpm_logo.png" alt="rpm_logo" width="125" height="80" />Continuing my Java learning stint, I started experimenting on RPM packages in the Granular <a title="Granular 2008 repository" href="http://www.granularproject.org/content/repo/granular/2008/" target="_blank">2008</a> repository by extracting meta data from them using various Java classes I had written for my on-going college major project. To give a shape (end-user interface) to these leisurely done Java programs, I used my existing project <a title="MyBlog homepage" href="http://myblog.granularproject.org/" target="_blank">MyBlog</a> to create a website that could display information (extracted by the Java programs) about every RPM package in the repository. In other words, the Java programs store information about each RPM package in a central database which in turn is used by a PHP-based website to display that information, and much more.</p>
<p>In the <a href="http://www.granularproject.org/teamblog/2009/03/27/introducing-granular-package-archive/" target="_blank">introduction to Granular Package Archive</a> post I wrote on the Team Granular blog, I explained the various features it has to offer. My personal favorite is the ability to leave comments on individual RPM pages. Other than that, I am quite satisfied with the overall look-and-feel too. In another of my Team Granular blog post, I explained the <a href="http://www.granularproject.org/teamblog/2009/03/29/making-of-granular-package-archive/" target="_blank">working of this package archive</a> system, and the way to use it with any other repository of RPM packages.</p>
<p>Some guys at the <a title="Unity Project homepage" href="http://unity-linux.org/" target="_blank">Unity Project</a> are also contemplating the idea of using this package archive system with their repository too.</p>
<img src="http://feeds.feedburner.com/~r/AnuragBhandariBlog/~4/nCFj6kHylHQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anuragbhandari.com/2009/04/granular-package-archive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.anuragbhandari.com/2009/04/granular-package-archive/</feedburner:origLink></item>
	</channel>
</rss>
