<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>WiseCodes &#187; Ajax</title>
	<atom:link href="http://www.wisecodes.com/category/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wisecodes.com</link>
	<description>Bringing You The Power of Code !!</description>
	<lastBuildDate>Wed, 01 Sep 2010 19:33:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Let Google host your javascript libraries</title>
		<link>http://www.wisecodes.com/2009/09/let-google-host-your-javascript-libraries/</link>
		<comments>http://www.wisecodes.com/2009/09/let-google-host-your-javascript-libraries/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 14:38:29 +0000</pubDate>
		<dc:creator>Venu Thomas</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.wisecodes.com/?p=887</guid>
		<description><![CDATA[An interesting possibility offered by Google developers use it as a CDN (content distribution network) for open source javascript libraries popular. In practice, this means is that in your web development, instead of going to your server for libraries that use scripting, you can directly reference and use the possibilities offered by this company in [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a rel="attachment wp-att-888" href="http://www.wisecodes.com/2009/09/let-google-host-your-javascript-libraries/googlecode/"><img class="size-full wp-image-888 aligncenter" title="GoogleCode" src="http://www.wisecodes.com/wp-content/uploads/2009/09/GoogleCode.jpg" alt="GoogleCode" width="161" height="40" /></a></p>
<p>An interesting possibility offered by Google developers use it as a CDN (content distribution network) for open source javascript libraries popular. In practice, this means is that in your web development, instead of going to your server for libraries that use scripting, you can directly reference and use the possibilities offered by this company in its servers.</p>
<p>This provides several advantages are not insignificant:</p>
<ul>
<li>First, the discharge of these libraries will, for the client, probably faster than if you have to get from your server through the Internet. This is Google&#8217;s network infrastructure, and that means guarantees.</li>
<li>Second, and related to the above, if this is a high traffic website, the audience will surely be allowed infinitely greater than you can offer to another server.</li>
<li>Third, if the user has previously visited another site that also use the same library, will benefit from the local cache of the same, because your browser does not again discharged. And in any case, they would be taking advantage of Google&#8217;s cache optimizations.</li>
<li>fourth, do not consume bandwidth from your provider, although this is negligible. And I mean negligible bandwidth, not the provider <img src='http://www.wisecodes.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
<li>fifth, you can use the libraries from sites hosted somewhere where you could not, or is not easy, upload scripts, as the platform <strong><a href="http://www.blogger.com/" target="_blank">Blogger</a></strong> from which to write.</li>
</ul>
<p>At this point includes: development frameworks, in all versions available:</p>
<ul>
<li>jQuery</li>
<li>jQuery UI</li>
<li>Prototype</li>
<li>script_aculo_us</li>
<li>MooTools</li>
<li>Dojo</li>
<li>SWFObject</li>
<li>Yahoo! User Interface Library (YUI)</li>
</ul>
<p>If you&#8217;re already using Google Ajax libraries (such as the Visualization API, or Google Maps), and get through the charger google.load (), you can also use it to download these frameworks. You can also do so through a direct reference, such as:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p887code2'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p8872"><td class="code" id="p887code2"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script 
src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Oh, and not worry about changing versions, or anything. Google is committed to live indefinitely all distributions to be published and include updates as they appear.</p>
<p>Finally, and to provide a negative view, some people think that this is one more strategy for Google to get information about users&#8217; browsing, code execution from its servers enable cookies and reading of data that could be used for purposes other than those provided on your website. Still others think it could be a source for the spread of malicious code if someone managed to hack these archives. Obviously not a good idea to use this option if you go to work in local mode, offline.</p>
<p>For more information on how to download and libraries available, you can visit the Developer Guide for <strong><a href="http://code.google.com/intl/en/apis/ajaxlibs/documentation/index.html" target="_blank">Ajax libraries API.</a></strong></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/09/let-google-host-your-javascript-libraries/" target="_blank"><img src="http://www.wisecodes.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/09/let-google-host-your-javascript-libraries/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wisecodes.com/2009/09/let-google-host-your-javascript-libraries/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>5 ways to use Ajax with jQuery</title>
		<link>http://www.wisecodes.com/2009/08/5-ways-to-use-ajax-with-jquery/</link>
		<comments>http://www.wisecodes.com/2009/08/5-ways-to-use-ajax-with-jquery/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 05:35:43 +0000</pubDate>
		<dc:creator>Venu Thomas</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[OpenSource]]></category>

		<guid isPermaLink="false">http://www.wisecodes.com/?p=804</guid>
		<description><![CDATA[The people of Nettuts publishes an interesting article on using  jQuery with Ajax. Specifically the 5 ways that jQuery allows us to send asynchronous requests. $.load() $.get() $.post() $.getJSON() $.getScript() $. load () This is the feature I like most about jQuery already makes one of the most common tasks of developing with Ajax is [...]]]></description>
			<content:encoded><![CDATA[<p>The people of <strong><a href="http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax-calls-with-jquery/" target="_blank">Nettuts publishes an interesting article</a></strong> on using  jQuery with Ajax. Specifically <strong><a href="http://docs.jquery.com/Ajax" target="_blank">the 5 ways that </a></strong><strong><a href="http://docs.jquery.com/Ajax" target="_blank">jQuery</a></strong><strong><a href="http://docs.jquery.com/Ajax" target="_blank"> allows us to send asynchronous requests.</a></strong></p>
<ul>
<li><em><span style="color: #993300;">$.load()</span></em></li>
<li><em><span style="color: #993300;">$.get()</span></em></li>
<li><em><span style="color: #993300;">$.post()</span></em></li>
<li><em><span style="color: #993300;">$.</span></em><em><span style="color: #993300;">getJSON</span></em><em><span style="color: #993300;">()</span></em></li>
<li><em><span style="color: #993300;">$.getScript()</span></em></li>
</ul>
<p><strong> </strong></p>
<h2>$. load ()</h2>
<p>This is the feature I like most about jQuery already makes one of the most common tasks of developing with Ajax is as simple and straightforward as we shall see in this example:</p>
<pre class="brush: jscript;">
$(&quot;#div_links&quot;).load(&quot;/Main_Page #jq-p-Getting-Started li&quot;);
</pre>
<p>This example brought to <strong><a href="http://docs.jquery.com/Ajax/load#urldatacallback" target="_blank">the documentation page on </a></strong><strong><a href="http://docs.jquery.com/Ajax/load#urldatacallback" target="_blank">jQuery</a></strong>, it manages to launch a request to the URL <span style="color: #993300;"><em>/Main_Page</em></span> (usa URL Rewrite) HTML response and take the <em><span style="color: #993300;">#jq-p-Getting-Started li</span></em> and inserted into <em><span style="color: #993300;">#div_links</span></em><br />
Just great, comfortable and fast.</p>
<h2><strong>$. get ()</strong></h2>
<p>This is the simple function with which we can launch the server via GET requests Ajax.</p>
<pre class="brush: jscript;">
$.get(&quot;test.cgi&quot;, { name: &quot;Venu&quot;, time: &quot;7pm&quot; },
  function(data){
    alert(&quot;Data Loaded: &quot; + data);
  });
</pre>
<p>By passing 3 options, 2 of which are options (rather conditional) you can request to launch the file (1) with parameters (2) and treat the response through a callback (3rd).</p>
<h2><strong>$. post ()</strong></h2>
<p>Like the above, this feature lets you send POST requests using Ajax.</p>
<pre class="brush: jscript;">
$.post(&quot;test.php&quot;, { name: &quot;Venu&quot;, time: &quot;7pm&quot; },
  function(data){
    alert(&quot;Data Loaded: &quot; + data);
  });
</pre>
<p>As easy as above.</p>
<h2><strong>$. </strong><strong>getJSON</strong><strong> ()</strong></h2>
<p>Although the above are able to specify the type of return, the best option is to use this method to obtain the response in JSON evaludada the callback function.</p>
<pre class="brush: jscript;">
$.getJSON(&quot;test.js&quot;, { name: &quot;Venu&quot;, time: &quot;7pm&quot; }, function(json){
  alert(&quot;JSON Data: &quot; + json.users[3].name);
});
</pre>
<p>Taking into account the browser, the object will use <strong><a href="http://www.wisecodes.com/2009/08/everything-you-ever-wanted-to-know-about-json/">native JSON</a></strong> or use a system based on <em><span style="color: #993300;">eval()</span></em>.</p>
<h2><strong>$. </strong><strong>getScript</strong><strong> ()</strong></h2>
<p>Although technically not an Ajax request is a request to the server and therefore has a place in the post.</p>
<pre class="brush: jscript;">
$.getScript(&quot;test.js&quot;, function(){
  alert(&quot;Script loaded and executed.&quot;);
});
</pre>
<p>With this method we can load a file asynchronously using JavaScript and the parameter (2) callback can execute Javascript code that is using the js file that we want to load (1).</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/08/5-ways-to-use-ajax-with-jquery/" target="_blank"><img src="http://www.wisecodes.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/08/5-ways-to-use-ajax-with-jquery/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wisecodes.com/2009/08/5-ways-to-use-ajax-with-jquery/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Preloaders.net: Loading of images in 3D</title>
		<link>http://www.wisecodes.com/2009/08/preloaders-net-loading-of-images-in-3d/</link>
		<comments>http://www.wisecodes.com/2009/08/preloaders-net-loading-of-images-in-3d/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 17:59:25 +0000</pubDate>
		<dc:creator>Venu Thomas</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Animation]]></category>

		<guid isPermaLink="false">http://www.wisecodes.com/?p=796</guid>
		<description><![CDATA[Preloaders.net shows me, a site style ajaxload.info that allows us to generate images of &#8220;Loading&#8221; for our applications, but this can generate images with animations in 3D. Share on Facebook]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://preloaders.net/" target="_blank">Preloaders.net</a></strong> shows me, a site style <strong><a href="http://ajaxload.info/" target="_blank">ajaxload.info</a></strong> that allows us to generate images of &#8220;Loading&#8221; for our applications, but this can generate images with animations in 3D.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/08/preloaders-net-loading-of-images-in-3d/" target="_blank"><img src="http://www.wisecodes.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/08/preloaders-net-loading-of-images-in-3d/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wisecodes.com/2009/08/preloaders-net-loading-of-images-in-3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What we can do ajax</title>
		<link>http://www.wisecodes.com/2009/07/what-we-can-do-ajax/</link>
		<comments>http://www.wisecodes.com/2009/07/what-we-can-do-ajax/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 19:05:08 +0000</pubDate>
		<dc:creator>Venu Thomas</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[Learn]]></category>

		<guid isPermaLink="false">http://www.wisecodes.com/?p=639</guid>
		<description><![CDATA[* Modifications to the browser, adding buttons, toolbars, bookmarks, icons, &#8230;. * Access to local files * Running music files or apply effects * HotKeys gives conflicts in other browsers * Access Hardware * Comnicaciones extended HTTP and other protocols. * Interaction with the Operating System Anyway time to time  Share on Facebook]]></description>
			<content:encoded><![CDATA[<p>* Modifications to the browser, adding buttons, toolbars, bookmarks, icons, &#8230;.<br />
* Access to local files<br />
* Running music files or apply effects<br />
* HotKeys gives conflicts in other browsers<br />
* Access Hardware<br />
* Comnicaciones extended HTTP and other protocols.<br />
* Interaction with the Operating System</p>
<p>Anyway time to time <img src="http://www.wisecodes.com/wp-includes/images/smilies/icon_biggrin.gif" alt="" /></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/07/what-we-can-do-ajax/" target="_blank"><img src="http://www.wisecodes.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/07/what-we-can-do-ajax/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wisecodes.com/2009/07/what-we-can-do-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disc Burner Windows Image</title>
		<link>http://www.wisecodes.com/2009/04/disc-burner-windows-image/</link>
		<comments>http://www.wisecodes.com/2009/04/disc-burner-windows-image/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 18:18:07 +0000</pubDate>
		<dc:creator>Venu Thomas</dc:creator>
				<category><![CDATA[Ajax]]></category>

		<guid isPermaLink="false">http://www.code.venuthomas.net/?p=289</guid>
		<description><![CDATA[I confess &#8230; I have not posted the installation of Windows Server 2008 R2 because I have been all weekend &#8220;playing&#8221; with Windows 7. Today browsing my external disks, I found I needed an ISO image to burn, one of the applications that I have not even installed in Windows 7 is PowerISO, but to [...]]]></description>
			<content:encoded><![CDATA[<p>I confess &#8230; I have not posted the installation of Windows Server 2008 R2 because I have been all weekend &#8220;playing&#8221; with Windows 7.</p>
<p>Today browsing my external disks, I found I needed an ISO image to burn, one of the applications that I have not even installed in Windows 7 is PowerISO, but to my surprise brings integrated Windows 7 can burn ISO files.</p>
<p>I think Windows XP that I wanted this ability come integrated into the OS.</p>
<p>I catch them in the process and how easy it is:</p>
<p><a href="http://www.code.venuthomas.net/" target="_blank"><img class="alignnone size-full wp-image-290" title="discburnerwindows7_01" src="http://www.wisecodes.com/wp-content/uploads/2009/04/discburnerwindows7_01.png" alt="discburnerwindows7_01" width="444" height="92" /></a></p>
<p><a href="http://www.code.venuthomas.net/" target="_blank"><img class="alignnone size-full wp-image-291" title="discburnerwindows7_02" src="http://www.wisecodes.com/wp-content/uploads/2009/04/discburnerwindows7_02.png" alt="discburnerwindows7_02" /></a></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/04/disc-burner-windows-image/" target="_blank"><img src="http://www.wisecodes.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/04/disc-burner-windows-image/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wisecodes.com/2009/04/disc-burner-windows-image/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AJAX Registration Page</title>
		<link>http://www.wisecodes.com/2009/02/ajax-registration-page/</link>
		<comments>http://www.wisecodes.com/2009/02/ajax-registration-page/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 17:00:29 +0000</pubDate>
		<dc:creator>Venu Thomas</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.code.venuthomas.net/?p=64</guid>
		<description><![CDATA[Here AJAX Registration Page with HTML &#38; Javascript. Checking username, length, password match.. Live Preview Download $(document).ready() : The most commonly used command in jQuery is $(document).ready(). It makes sure code is executed only when a page is fully loaded. We often place code blocks inside this $(document).ready() event. ?View Code JAVASCRIPT&#160; &#60;script type=&#34;text/javascript&#34; src=&#34;jquery-1.2.6.min.js&#34;&#62;&#60;/script&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Here AJAX Registration Page with HTML &amp; Javascript. Checking username, length, password match..</p>
<p><strong><a href="http://code.venuthomas.net/Code/Ajax_RegisterPage/" target="_blank"><img class="alignnone size-full wp-image-18" title="live_preview" src="http://www.wisecodes.com/wp-content/uploads/2009/02/live_preview.png" alt="live_preview" width="32" height="32" />Live Preview</a> <a href="http://code.venuthomas.net/Code/Ajax_RegisterPage/Ajax_RegisterPage.zip" target="_blank"><img class="alignnone size-full wp-image-29" title="download" src="http://www.wisecodes.com/wp-content/uploads/2009/02/download.gif" alt="download" width="32" height="35" />Download</a></strong></p>
<p><strong>$(document).ready() :</strong></p>
<p>The most commonly used command in jQuery is <a href="http://www.learningjquery.com/2006/09/introducing-document-ready" target="_blank">$(document).ready()</a>. It makes sure code is executed only when a page is fully loaded. We often place code blocks inside this <a href="http://www.learningjquery.com/2006/09/introducing-document-ready" target="_blank">$(document).ready()</a> event.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p64code12'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6412"><td class="code" id="p64code12"><pre class="javascript" style="font-family:monospace;">&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;jquery-1.2.6.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Your Code</span>
&nbsp;
$<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>
&nbsp;
<span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Put all your jQuery goodness in here.</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Checking Username Length:</strong></p>
<p>When guest types something in Username field less than 3 characters and focus move from it to next field. An error will be occurred .</p>
<p><img class="alignnone size-full wp-image-69" title="username3" src="http://www.wisecodes.com/wp-content/uploads/2009/02/username3.jpg" alt="username3" width="611" height="38" /></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p64code13'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6413"><td class="code" id="p64code13"><pre class="javascript" style="font-family:monospace;">&nbsp;
usr <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#txt_username&quot;</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>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>usr.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">//checking username length</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// Checking username code here..</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">else</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">//Error Message code here..</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Chekcing Username:</strong></p>
<p>When guest types something in Username field greater than or equal 3 characters and focus move from it to next field Then, A waiting message will be displayed with small image as loader.gif.</p>
<p><img class="alignnone size-full wp-image-65" title="checkingusername" src="http://www.wisecodes.com/wp-content/uploads/2009/02/checkingusername.jpg" alt="checkingusername" width="410" height="30" /></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p64code14'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6414"><td class="code" id="p64code14"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#div_status&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;img src=&quot;loader.gif&quot; align=&quot;absmiddle&quot;&gt;&amp;nbsp;Checking username....'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><strong>If Username is available:</strong></p>
<p>if username available from database. Ajax will display like this, Otherwise, An error will be occurred.</p>
<p><img class="alignnone size-full wp-image-70" title="usernameready" src="http://www.wisecodes.com/wp-content/uploads/2009/02/usernameready.jpg" alt="usernameready" width="294" height="30" /></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p64code15'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6415"><td class="code" id="p64code15"><pre class="javascript" style="font-family:monospace;">	$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;POST&quot;</span><span style="color: #339933;">,</span>
    url<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;check_username.php&quot;</span><span style="color: #339933;">,</span>
    data<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;username=&quot;</span><span style="color: #339933;">+</span> usr<span style="color: #339933;">,</span>
    success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#div_status&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ajaxComplete</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #339933;">,</span> request<span style="color: #339933;">,</span> settings<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>msg <span style="color: #339933;">==</span> <span style="color: #3366CC;">'OK'</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #006600; font-style: italic;">// If the username available, goes here.</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: #006600; font-style: italic;">//If the username not available, goes here.</span>
		<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Checking Password:</strong></p>
<p>When guest types something in password field less than 3 characters and focus move from it to next field. An error will be occurred .</p>
<p><img class="alignnone size-full wp-image-66" title="password3" src="http://www.wisecodes.com/wp-content/uploads/2009/02/password3.jpg" alt="password3" width="601" height="38" /></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p64code16'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6416"><td class="code" id="p64code16"><pre class="javascript" style="font-family:monospace;">&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> str_confirm_password <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#txt_confirm_password&quot;</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>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>str_password.<span style="color: #660066;">length</span>  <span style="color: #339933;">&gt;=</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// Checking Password match code here..</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: #006600; font-style: italic;">// Error message code here..</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Checking Password Match:</strong></p>
<p>When guest types something in Password &amp; Confirm Password fields, and focus move from it to next field. Then, it will check value of both fields. If both field&#8217;s value are not same then, an error will be displayed.</p>
<p>If not match</p>
<p><img class="alignnone size-full wp-image-67" title="passwordnotmatch" src="http://www.wisecodes.com/wp-content/uploads/2009/02/passwordnotmatch.jpg" alt="passwordnotmatch" width="601" height="62" /></p>
<p>If match</p>
<p><img class="alignnone size-full wp-image-68" title="passwordready" src="http://www.wisecodes.com/wp-content/uploads/2009/02/passwordready.jpg" alt="passwordready" width="338" height="64" /></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p64code17'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6417"><td class="code" id="p64code17"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> str_password <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#txt_password&quot;</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: #003366; font-weight: bold;">var</span> str_confirm_password <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#txt_confirm_password&quot;</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>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>str_password<span style="color: #339933;">!=</span>str_confirm_password<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// If not match, goes here,</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: #006600; font-style: italic;">//If match, goes here.</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>&#8220;Sign Up Now&#8221; Button :</strong></p>
<p>When guest push &#8220;Sign Up Now!&#8221; button. It goes to next page .</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p64code18'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6418"><td class="code" id="p64code18"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> fn_onclick<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>str_status <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;OK&quot;</span> <span style="color: #339933;">&amp;&amp;</span> str_pwd_status <span style="color: #339933;">==</span><span style="color: #3366CC;">&quot;OK&quot;</span> <span style="color: #339933;">&amp;&amp;</span> str_password <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span> <span style="color: #339933;">&amp;&amp;</span> str_confirm_password <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: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#div_msg&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;div id=&quot;logged_in&quot;&gt; &lt;br /&gt;'</span> <span style="color: #339933;">+</span>
    	 <span style="color: #3366CC;">'Thanks for Registering &lt;br /&gt;'</span> <span style="color: #339933;">+</span>
   		  <span style="color: #3366CC;">'&lt;img align=&quot;absmiddle&quot; src=&quot;loader_bar.gif&quot;&gt;'</span> <span style="color: #339933;">+</span>
    	 <span style="color: #3366CC;">'&lt;br /&gt; Please wait while we redirect you to welcome page...&lt;/div&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		setTimeout<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'go_to_next_page()'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">4000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> go_to_next_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	window.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'welcome.html'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>.removeClass() &amp; .addClass() functions :</strong></p>
<p>.removeClass() &amp; .addClass() functions are used for add styles into username &amp; password fields. In code, &#8216;css_ok&#8217; &amp; &#8216;css_error&#8217; regarding from &#8216;style.css&#8217; . For instance  these  functions show the box green if the values entered in the boxes are correct &amp; otherwise red color</p>
<p>.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p64code19'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6419"><td class="code" id="p64code19"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;stylesheet&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/css&quot;</span> href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;style.css&quot;</span> <span style="color: #339933;">/&gt;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// Your code here..</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#txt_username&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'css_ok'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#txt_username&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;css_error&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In style.css,</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p64code20'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6420"><td class="code" id="p64code20"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.css_ok</span>
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">green</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333333</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.css_error</span>
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#AC3962</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333333</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><strong><a href="http://code.venuthomas.net/Code/Ajax_RegisterPage/" target="_blank"><img class="alignnone size-full wp-image-18" title="live_preview" src="http://www.wisecodes.com/wp-content/uploads/2009/02/live_preview.png" alt="live_preview" width="32" height="32" />Live Preview</a> <a href="http://code.venuthomas.net/Code/Ajax_RegisterPage/Ajax_RegisterPage.zip" target="_blank"><img class="alignnone size-full wp-image-29" title="download" src="http://www.wisecodes.com/wp-content/uploads/2009/02/download.gif" alt="download" width="32" height="35" />Download</a></strong></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/02/ajax-registration-page/" target="_blank"><img src="http://www.wisecodes.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/02/ajax-registration-page/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wisecodes.com/2009/02/ajax-registration-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pure Ajax in Asp.Net 4.0</title>
		<link>http://www.wisecodes.com/2009/02/pure-ajax-in-aspnet-40/</link>
		<comments>http://www.wisecodes.com/2009/02/pure-ajax-in-aspnet-40/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 05:26:53 +0000</pubDate>
		<dc:creator>Venu Thomas</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Learn]]></category>

		<guid isPermaLink="false">http://www.code.venuthomas.net/?p=33</guid>
		<description><![CDATA[Here is an interesting article on pure Ajax in Asp.Net 4.0.This article claims that the previous versions of Ajax is not partial post back. Source : Click Here.. Share on Facebook]]></description>
			<content:encoded><![CDATA[<p>Here is an interesting article on pure Ajax in Asp.Net 4.0.This article claims that the previous versions of Ajax is not partial post back.</p>
<p><span style="color: #0000ee; font-family: Helvetica; line-height: normal; text-decoration: underline;"><br />
</span><object width="100%" height="500" data="http://d.scribd.com/ScribdViewer.swf?document_id=12497604&amp;access_key=key-1o99kjbcjptrwi2zp75p&amp;page=1&amp;version=1&amp;viewMode=list" type="application/x-shockwave-flash"><param name="id" value="doc_492419857944150" /><param name="name" value="doc_492419857944150" /><param name="align" value="middle" /><param name="quality" value="high" /><param name="play" value="true" /><param name="loop" value="true" /><param name="scale" value="showall" /><param name="wmode" value="opaque" /><param name="devicefont" value="false" /><param name="bgcolor" value="#ffffff" /><param name="menu" value="true" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="mode" value="list" /><param name="src" value="http://d.scribd.com/ScribdViewer.swf?document_id=12497604&amp;access_key=key-1o99kjbcjptrwi2zp75p&amp;page=1&amp;version=1&amp;viewMode=list" /><param name="allowfullscreen" value="true" /></object></p>
<div style="margin: 6px auto 3px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;"><span style="color: #551a8b; text-decoration: underline;"><a href="http://msdn.microsoft.com/en-us/magazine/cc972638.aspx" target="_blank">Source : Click Here..</a> </span></div>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/02/pure-ajax-in-aspnet-40/" target="_blank"><img src="http://www.wisecodes.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/02/pure-ajax-in-aspnet-40/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wisecodes.com/2009/02/pure-ajax-in-aspnet-40/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajax Based Search Engine With PHP and XML</title>
		<link>http://www.wisecodes.com/2009/02/ajax-based-search-engine-with-php-and-xml/</link>
		<comments>http://www.wisecodes.com/2009/02/ajax-based-search-engine-with-php-and-xml/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 19:52:18 +0000</pubDate>
		<dc:creator>Venu Thomas</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.code.venuthomas.net/?p=12</guid>
		<description><![CDATA[Here Sample code of Ajax based search engine with PHP and XML  Live Preview          Download Code   This is the Javascript Code : ?View Code JAVASCRIPT/* &#38;lt;--------------------------&#38;gt; */ /* XMLHTTPRequest Enable */ /* &#38;lt;--------------------------&#38;gt; */ function createObject&#40;&#41; &#123; var request_type; var browser = navigator.appName; if&#40;browser == &#34;Microsoft Internet Explorer&#34;&#41;&#123; request_type = new ActiveXObject&#40;&#34;Microsoft.XMLHTTP&#34;&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>Here Sample code of Ajax based search engine with PHP and XML</p>
<p><span style="color: #000000; text-decoration: none;"><span style="color: #000000; text-decoration: none;"><span style="color: #000000; text-decoration: none;"><a href="http://code.venuthomas.net/Code/Ajax_SearchEngine/html_Search.html" target="_blank"><img class="alignnone size-full wp-image-18" title="live_preview" src="http://www.wisecodes.com/wp-content/uploads/2009/02/live_preview.png" alt="live_preview" width="32" height="32" /> Live Preview</a><span style="color: #000000; text-decoration: none;">          </span><a href="http://code.venuthomas.net/Code/Ajax_SearchEngine/AjaxSearchEngine.zip" target="_blank"><img class="alignnone size-full wp-image-29" title="download" src="http://www.wisecodes.com/wp-content/uploads/2009/02/download.gif" alt="download" width="32" height="35" /></a><span style="color: #000000; text-decoration: none;"><a href="http://code.venuthomas.net/Code/Ajax_SearchEngine/AjaxSearchEngine.zip" target="_blank">Download Code</a></span></span></span></span></p>
<p> </p>
<p><strong>This is the Javascript Code :</strong></p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p12code23'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1223"><td class="code" id="p12code23"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* &amp;lt;--------------------------&amp;gt; */</span>
<span style="color: #009966; font-style: italic;">/* XMLHTTPRequest Enable		*/</span>
<span style="color: #009966; font-style: italic;">/* &amp;lt;--------------------------&amp;gt; */</span>
<span style="color: #003366; font-weight: bold;">function</span> createObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> request_type<span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> browser <span style="color: #339933;">=</span> navigator.<span style="color: #660066;">appName</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>browser <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;Microsoft Internet Explorer&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
request_type <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Microsoft.XMLHTTP&quot;</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>
request_type <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> XMLHttpRequest<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> request_type<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> http <span style="color: #339933;">=</span> createObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009966; font-style: italic;">/* &amp;lt;--------------------------&amp;gt; */</span>
<span style="color: #009966; font-style: italic;">/* 		SEARCH				   */</span>
<span style="color: #009966; font-style: italic;">/* &amp;lt;--------------------------&amp;gt; */</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> fnSearchName<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
txtInput<span style="color: #339933;">=</span><span style="color: #000066; font-weight: bold;">encodeURI</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'txtInput'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'divmsg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #339933;">;</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'divmsg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Searching for &lt;strong&gt;&quot;</span> <span style="color: #339933;">+</span> txtInput<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/strong&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set te random number to add to URL request</span>
nocache <span style="color: #339933;">=</span> Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
http.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'get'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'php_Search.php?name='</span><span style="color: #339933;">+</span>txtInput<span style="color: #339933;">+</span><span style="color: #3366CC;">'&amp;amp;nocache = '</span><span style="color: #339933;">+</span>nocache<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
http.<span style="color: #660066;">onreadystatechange</span> <span style="color: #339933;">=</span> fnSearchNameReply<span style="color: #339933;">;</span>
http.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> fnSearchNameReply<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> response <span style="color: #339933;">=</span> http.<span style="color: #660066;">responseText</span><span style="color: #339933;">;</span>
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'divResult'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span><span style="color: #339933;">=</span>response<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>This is the PHP Code :</strong></p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p12code24'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1224"><td class="code" id="p12code24"><pre class="php" style="font-family:monospace;">load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;NameList.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$x</span><span style="color: #339933;">=</span><span style="color: #000088;">$xmlDoc</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getElementsByTagName<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'NAME'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;=</span><span style="color: #000088;">$x</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>length<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">//Process only element nodes</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>item<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>nodeType<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: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>item<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>childNodes<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>item<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>nodeValue <span style="color: #339933;">==</span> <span style="color: #000088;">$q</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$y</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>item<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>parentNode<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;">&#125;</span>
<span style="color: #000088;">$cd</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$y</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>childNodes<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #000088;">$cd</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>length<span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">//Process only element nodes</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$cd</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>item<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>nodeType<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: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cd</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>item<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>nodeName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;: &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cd</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>item<span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>childNodes<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>item<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>nodeValue<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></td></tr></table></div>

<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/02/ajax-based-search-engine-with-php-and-xml/" target="_blank"><img src="http://www.wisecodes.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/02/ajax-based-search-engine-with-php-and-xml/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wisecodes.com/2009/02/ajax-based-search-engine-with-php-and-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

