<?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>Bloggeh.com &#187; Ajax</title>
	<atom:link href="http://www.bloggeh.com/category/web-development/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloggeh.com</link>
	<description>Bits and pieces</description>
	<lastBuildDate>Thu, 03 Feb 2011 04:01:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Scriptaculous Cool Javascript/AJAX tricks</title>
		<link>http://www.bloggeh.com/2008/06/10/scriptaculous-cool-javascriptajax-tricks/</link>
		<comments>http://www.bloggeh.com/2008/06/10/scriptaculous-cool-javascriptajax-tricks/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 07:18:02 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.bloggeh.com/2008/06/10/scriptaculous-cool-javascriptajax-tricks/</guid>
		<description><![CDATA[Cool animations for div&#8217;s/text/images -
http://github.com/madrobby/scriptaculous/wikis/combination-effects-demo
AJAX.Inplace editor -
http://github.com/madrobby/scriptaculous/wikis/ajax-inplaceeditor
]]></description>
			<content:encoded><![CDATA[<p>Cool animations for div&#8217;s/text/images -<br />
<a href="http://github.com/madrobby/scriptaculous/wikis/combination-effects-demo" title="Combination Effects" target="_blank">http://github.com/madrobby/scriptaculous/wikis/combination-effects-demo</a></p>
<p>AJAX.Inplace editor -<br />
<a href="http://github.com/madrobby/scriptaculous/wikis/ajax-inplaceeditor" target="_blank">http://github.com/madrobby/scriptaculous/wikis/ajax-inplaceeditor</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggeh.com/2008/06/10/scriptaculous-cool-javascriptajax-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My AJAX Notes</title>
		<link>http://www.bloggeh.com/2008/05/26/my-ajax-notes/</link>
		<comments>http://www.bloggeh.com/2008/05/26/my-ajax-notes/#comments</comments>
		<pubDate>Mon, 26 May 2008 03:30:04 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.bloggeh.com/2008/05/26/my-ajax-notes/</guid>
		<description><![CDATA[The initial code
We are going to &#8220;try&#8221; three different ways to make a new XMLHttpRequest object. Every time we fail and get an error, we will catch the error and try the next a different command. This is necessary code for all AJAX applications.
function ajaxFunction(){
var ajaxRequest;  // The variable that makes Ajax possible!
try{
// Opera [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The initial code</strong><br />
We are going to &#8220;try&#8221; three different ways to make a new XMLHttpRequest object. Every time we fail and get an error, we will catch the error and try the next a different command. This is necessary code for all AJAX applications.</p>
<p>function ajaxFunction(){<br />
var ajaxRequest;  // The variable that makes Ajax possible!</p>
<p>try{<br />
// Opera 8.0+, Firefox, Safari<br />
ajaxRequest = new XMLHttpRequest();<br />
} catch (e){<br />
// Internet Explorer Browsers<br />
try{<br />
ajaxRequest = new ActiveXObject(&#8220;Msxml2.XMLHTTP&#8221;);<br />
} catch (e) {<br />
try{<br />
ajaxRequest = new ActiveXObject(&#8220;Microsoft.XMLHTTP&#8221;);<br />
} catch (e){<br />
// Something went wrong<br />
alert(&#8220;Your browser broke!&#8221;);<br />
return false;<br />
}<br />
}<br />
}</p>
<p><strong>Using the <em>XMLHttpRequest</em> object</strong></p>
<p>We have stored our XMLHttpRequest object in the variable <em>ajaxRequest</em>, and using this object is how we will communicate with the server.</p>
<p><strong>The onreadystatechange property<br />
</strong></p>
<p>The onreadystatechange property stores the function that will <u>process the  response from a server</u>. The following code defines an empty function and sets  the onreadystatechange property at the same time:</p>
<p>ajaxRequest.onreadystatechange = function()  {<br />
// code goes here.<br />
}</p>
<p><strong>The readystate property</strong></p>
<p>The <em>XMLHttpRequest</em> object has another property called <em>readyState</em>.  This is where the status of our server&#8217;s <em>response</em> is stored.   Each time the readyState changes,  the onreadystatechange function will be executed.</p>
<table class="ex" id="table7" border="1" cellpadding="2" cellspacing="0" height="116" width="259">
<tr>
<th align="left" width="10%">State</th>
<th align="left">Description</th>
</tr>
<tr>
<td>0</td>
<td>The request is not initialized</td>
</tr>
<tr>
<td>1</td>
<td>The request has been set up</td>
</tr>
<tr>
<td>2</td>
<td>The request has been sent</td>
</tr>
<tr>
<td>3</td>
<td>The request is in process</td>
</tr>
<tr>
<td>4</td>
<td>The request is complete</td>
</tr>
</table>
<p>If the <em>readystate </em>is set to 4, then we can collect/process our data. Going back to the function we created earlier:</p>
<p>ajaxRequest.onreadystatechange = function() {<br />
if (ajaxRequest.readystate == 4) {<br />
// get data from server response<br />
}<br />
}</p>
<p><strong>The responseText property</strong></p>
<p>The data sent back from the server can be retrieved using the responseText property. For example, if you wanted to change the field in a textbox equal to the response from the server you would use:</p>
<p>ajaxRequest.onreadystatechange = function() {<br />
if (ajaxRequest.readystate == 4) {<br />
document.myForm.time.value = ajaxRequest.responseText;<br />
}<br />
}</p>
<p><strong>Sending a request to the server</strong></p>
<p>To send off a request to the server, we use the open() method and the send()  method.</p>
<p>The open() method takes three arguments. The first argument defines which  method to use when sending the request (GET or POST). The second argument  specifies the URL of the server-side script. The third argument specifies that  the request should be handled asynchronously. The send() method sends the request off to the  server.</p>
<p>If your PHP/ASP script was in the same directory as this Ajax script, your code would look like this:</p>
<p>ajaxRequest.open(&#8220;GET&#8221;, &#8220;time.php&#8221;,true);<br />
ajaxRequest.send(null);</p>
<p><strong>Activating AJAX in a form</strong></p>
<p>Let&#8217;s say that you wanted the AJAX request to be fired off each time a field was completed in a form. You could use the code below:</p>
<p>&lt;form name=&#8221;myForm&#8221;&gt;<br />
Name:&lt;input type=&#8221;text&#8221; onChange=&#8221;ajaxFunction();&#8221; name=&#8221;username&#8221; /&gt;<br />
Time: &lt;input type=&#8221;text&#8221; name=&#8221;time&#8221; /&gt;<br />
&lt;/form&gt;</p>
<p>Credit goes to: http://www.tizag.com  and http://www.w3schools.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggeh.com/2008/05/26/my-ajax-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HighSlide JS &#8211; Image Enlarger/Ajax Popup</title>
		<link>http://www.bloggeh.com/2008/01/21/highslide-js-image-enlargerajax-popup/</link>
		<comments>http://www.bloggeh.com/2008/01/21/highslide-js-image-enlargerajax-popup/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 22:41:57 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.bloggeh.com/2008/01/21/highslide-js-image-enlargerajax-popup/</guid>
		<description><![CDATA[Official Site: http://vikjavev.no/highslide/
.NET variation:?  http://encosia.com/downloads/highslide-js-net/
]]></description>
			<content:encoded><![CDATA[<p>Official Site: <a href="http://vikjavev.no/highslide/" title="Highslide" target="_blank">http://vikjavev.no/highslide/</a></p>
<p>.NET variation:?  <a href=".NET variation:  http://encosia.com/downloads/highslide-js-net/" target="_blank">http://encosia.com/downloads/highslide-js-net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggeh.com/2008/01/21/highslide-js-image-enlargerajax-popup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fantastic Real-time Validation Javascript</title>
		<link>http://www.bloggeh.com/2007/11/16/fantastic-real-time-validation-javascript/</link>
		<comments>http://www.bloggeh.com/2007/11/16/fantastic-real-time-validation-javascript/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 14:55:49 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.bloggeh.com/2007/11/16/fantastic-real-time-validation-javascript/</guid>
		<description><![CDATA[In compressed form has a very light footprint of only 10kb.? ?  The validation isn&#8217;t laggy at all. Excellent tool.
http://www.livevalidation.com/
]]></description>
			<content:encoded><![CDATA[<p>In compressed form has a very light footprint of only 10kb.? ?  The validation isn&#8217;t laggy at all. Excellent tool.</p>
<p><a href="http://www.livevalidation.com/" target="_blank">http://www.livevalidation.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggeh.com/2007/11/16/fantastic-real-time-validation-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Style your site right &#8211; with StyleIgnite.com</title>
		<link>http://www.bloggeh.com/2007/11/15/style-your-site-right-with-styleignitecom/</link>
		<comments>http://www.bloggeh.com/2007/11/15/style-your-site-right-with-styleignitecom/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 08:58:28 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.bloggeh.com/2007/11/15/style-your-site-right-with-styleignitecom/</guid>
		<description><![CDATA[http://www.styleignite.com/
]]></description>
			<content:encoded><![CDATA[<p>http://www.styleignite.com/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggeh.com/2007/11/15/style-your-site-right-with-styleignitecom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>80+ AJAX-Solutions For Professional Coding</title>
		<link>http://www.bloggeh.com/2007/11/02/80-ajax-solutions-for-professional-coding/</link>
		<comments>http://www.bloggeh.com/2007/11/02/80-ajax-solutions-for-professional-coding/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 23:41:35 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Ajax]]></category>

		<guid isPermaLink="false">http://www.bloggeh.com/2007/11/02/80-ajax-solutions-for-professional-coding/</guid>
		<description><![CDATA[http://www.smashingmagazine.com/2007/06/20/ajax-javascript-solutions-for-professional-coding/
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.smashingmagazine.com/2007/06/20/ajax-javascript-solutions-for-professional-coding/" target="_blank">http://www.smashingmagazine.com/2007/06/20/ajax-javascript-solutions-for-professional-coding/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggeh.com/2007/11/02/80-ajax-solutions-for-professional-coding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

