<?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>Css templates &#124; CssTemplatesWeb &#187; Ajax Articles</title> <atom:link href="http://www.csstemplatesweb.com/category/ajax-articles/feed/" rel="self" type="application/rss+xml" /><link>http://www.csstemplatesweb.com</link> <description>High quality css templates</description> <lastBuildDate>Sun, 17 Jan 2010 20:58:17 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>YUI Animation Tutorial</title><link>http://www.csstemplatesweb.com/ajax-articles/yui-animation-tutorial/</link> <comments>http://www.csstemplatesweb.com/ajax-articles/yui-animation-tutorial/#comments</comments> <pubDate>Mon, 20 Jul 2009 00:13:14 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Ajax Articles]]></category> <category><![CDATA[ajax]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[tutorial]]></category> <category><![CDATA[xhtml]]></category> <category><![CDATA[yahoo]]></category> <category><![CDATA[yui]]></category><guid
isPermaLink="false">http://www.csstemplatesweb.com/?p=217</guid> <description><![CDATA[The Yahoo UI library is the reason for most of the cool functions you see on some of Yahoo&#8217;s sites, like Flickr and Delicious. It&#8217;s still in active development by Yahoo and the community of YUI developers. It offers a lot of functions, Ajax support and animation effects. It&#8217;s cross-browser, and it&#8217;s packed with rich [...]]]></description> <content:encoded><![CDATA[<p>The Yahoo UI library is the reason for most of the cool functions you see on some of Yahoo&#8217;s sites, like Flickr and Delicious. It&#8217;s still in active development by Yahoo and the community of YUI developers. It offers a lot of functions, Ajax support and animation effects. It&#8217;s cross-browser, and it&#8217;s packed with rich UI elements, like dialogs, calendars, WYSIWIG editors, sliders and DataTables. Both demos and documentation can be found at <a
href="http://developer.yahoo.com/yui">developer.yahoo.com/yui</a></p><h3>The YUI Animation library</h3><p>In our <a
href="http://templates.csstemplatesweb.com/yuianimation/">example</a>, we&#8217;ve put together a few examples on how to use the Yahoo animation library. The first thing we did, was to include the YUI core and the minified version of the YUI animation library. We include these two files directly from Yahoo&#8217;s own servers, both to save bandwith, and to let the visitors use the cached version of the files if they&#8217;ve already visited a site that&#8217;s using these. The code for including the scripts:</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('p217code3'); return false;">View Code</a> HTML4STRICT</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p2173"><td
class="code" id="p217code3"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- YUI Core --&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;http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.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;!-- YUI Animation Library --&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;http://yui.yahooapis.com/2.7.0/build/animation/animation-min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div><p>Now we have the javascripts we need. Next thing to do is to use them. This block shows you the code for the first example:</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('p217code4'); return false;">View Code</a> HTML4STRICT</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p2174"><td
class="code" id="p217code4"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;block&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h3</span>&gt;</span>Animating a property<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h3</span>&gt;</span>	                        
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Click the block below to animate the width of the block.<span style="color: #009900;">&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;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;demo1&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: #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>&gt;</span>
    YAHOO.util.Event.on('demo1', 'click', function() {
    var anim = new YAHOO.util.Anim(this, { width: { to: 200} });
    anim.animate();
    });
    <span style="color: #009900;">&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: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div><p>Check all the examples on our demo site: <a
href="http://templates.csstemplatesweb.com/yuianimation/">YUI examples</a><br
/> If you want to download the whole example, you can do so here:</p> Note: There is a file embedded within this post, please visit this post to download the file.
]]></content:encoded> <wfw:commentRss>http://www.csstemplatesweb.com/ajax-articles/yui-animation-tutorial/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Ajax Twitter feed with Scriptaculous</title><link>http://www.csstemplatesweb.com/ajax-articles/ajax-twitter-feed-scriptaculous/</link> <comments>http://www.csstemplatesweb.com/ajax-articles/ajax-twitter-feed-scriptaculous/#comments</comments> <pubDate>Mon, 20 Apr 2009 08:24:29 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Ajax Articles]]></category> <category><![CDATA[ajax]]></category> <category><![CDATA[Feed]]></category> <category><![CDATA[twitter]]></category> <category><![CDATA[web 2.0]]></category> <category><![CDATA[web design]]></category> <category><![CDATA[webdesign]]></category><guid
isPermaLink="false">http://www.csstemplatesweb.com/?p=75</guid> <description><![CDATA[This example shows you how to integrate your Twitter on your website. It uses some custom javascript code, and it also uses the scriptaculous library to use a sliding effect. In this example it will show the 5 latest entries from your Twitter account.
You can see a video of how this works, shown in the [...]]]></description> <content:encoded><![CDATA[<p>This example shows you how to integrate your Twitter on your website. It uses some custom javascript code, and it also uses the scriptaculous library to use a sliding effect. In this example it will show the 5 latest entries from your Twitter account.</p><p><a
href="http://blip.tv/file/1726909/" target="_blank">You can see a video of how this works, shown in the demovideo of the template &#8220;Personal Homepage&#8221;.</a></p><p>We will start with the html file, in this case: index.html. You need to add the following code in the head section:</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('p75code8'); return false;">View Code</a> HTML4STRICT</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p758"><td
class="code" id="p75code8"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</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;http://yui.yahooapis.com/2.5.2/build/reset/reset-min.css&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;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;styles.css&quot;</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;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;screen&quot;</span> <span style="color: #66cc66;">/</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/prototype.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/scriptaculous.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;&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/ajax.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div><p>And then, somewhere in the body tag, you need to add this code (this is the code for showing the Twitter feed).</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('p75code9'); return false;">View Code</a> HTML4STRICT</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p759"><td
class="code" id="p75code9"><pre class="html4strict" style="font-family:monospace;"><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;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;list&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Twitter<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</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;spinner-twitter&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;spinner&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;16&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;16&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;list-twitter&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;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;">div</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;http://twitter.com/statuses/user_timeline/SveinErik.json?callback=twitterCallback2&amp;count=5&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: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></pre></td></tr></table></div><p>As you can see in the last line, you can see the name &#8220;SveinErik&#8221;, that is my Twitter username, so you need to put your own username there. The last thing, the magic, is found in the Ajax.js file (also included in the .zip file), this is where the actual javascript code for both getting the feed from Twitter, and also a function for showing how long ago each status update was written (like 2 days ago etc).</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('p75code10'); return false;">View Code</a> JAVASCRIPT</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p7510"><td
class="code" id="p75code10"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> relative_time<span style="color: #009900;">&#40;</span>time_value<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> values <span style="color: #339933;">=</span> time_value.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot; &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
time_value <span style="color: #339933;">=</span> values<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; &quot;</span> <span style="color: #339933;">+</span> values<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;, &quot;</span> <span style="color: #339933;">+</span> values<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">5</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; &quot;</span> <span style="color: #339933;">+</span> values<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> parsed_date <span style="color: #339933;">=</span> Date.<span style="color: #660066;">parse</span><span style="color: #009900;">&#40;</span>time_value<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> relative_to <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>arguments.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> arguments<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">new</span> Date<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> delta <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>relative_to.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> parsed_date<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
delta <span style="color: #339933;">=</span> delta <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>relative_to.<span style="color: #660066;">getTimezoneOffset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">60</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>delta <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">60</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'less than a minute ago'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> 
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">120</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'about a minute ago'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">60</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>parseInt<span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">/</span> <span style="color: #CC0000;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">' minutes ago'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">120</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'about an hour ago'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">24</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">60</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'about '</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>parseInt<span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">/</span> <span style="color: #CC0000;">3600</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">' hours ago'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">48</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">60</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'1 day ago'</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; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>parseInt<span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">/</span> <span style="color: #CC0000;">86400</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">' days ago'</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> twitterCallback2<span style="color: #009900;">&#40;</span>twitters<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> statusHTML <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> twitters.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
statusHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;li&gt;'</span> <span style="color: #339933;">+</span>
twitters<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">text</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;nbsp;&lt;small&gt;('</span> <span style="color: #339933;">+</span>
relative_time<span style="color: #009900;">&#40;</span>twitters<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">created_at</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">')&lt;/small&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'list-twitter'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;ul&gt;'</span> <span style="color: #339933;">+</span> statusHTML <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'spinner-twitter'</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;">&#40;</span><span style="color: #3366CC;">'list-twitter'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideDown</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> duration<span style="color: #339933;">:</span> <span style="color: #CC0000;">2</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div><p>You can download the .zip file, containing a fully working example. This is the same code as used in the template &#8220;Personal Homepage&#8221;, which also include similiar ajax effects to grab the feed from both Twitter, Delicious and Flickr. It is available for only $9 in the shop.<br
/> Good luck!</p> Note: There is a file embedded within this post, please visit this post to download the file.
]]></content:encoded> <wfw:commentRss>http://www.csstemplatesweb.com/ajax-articles/ajax-twitter-feed-scriptaculous/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Json Flickr Feed example</title><link>http://www.csstemplatesweb.com/ajax-articles/json-flickr-feed-example/</link> <comments>http://www.csstemplatesweb.com/ajax-articles/json-flickr-feed-example/#comments</comments> <pubDate>Thu, 31 Jul 2008 22:50:21 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Ajax Articles]]></category> <category><![CDATA[ajax]]></category> <category><![CDATA[Feed]]></category> <category><![CDATA[Flickr]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[Json]]></category><guid
isPermaLink="false">http://www.csstemplatesweb.com/?p=38</guid> <description><![CDATA[In many cases, you want to show pictures on your website. In some of these cases, you&#8217;ll want users to upload their own pictures. This could mean that you would have to build an upload system, with lot&#8217;s of security issues around it, and it also means that you&#8217;ll have to have a lot of [...]]]></description> <content:encoded><![CDATA[<p>In many cases, you want to show pictures on your website. In some of these cases, you&#8217;ll want users to upload their own pictures. This could mean that you would have to build an upload system, with lot&#8217;s of security issues around it, and it also means that you&#8217;ll have to have a lot of webspace available at your webhost. Luckily, there is a really easy <strong>and </strong>neat solution to this.</p><p><a
title="Flickr" href="http://www.flickr.com" target="_blank">Flickr</a> has been the number 1 for storing pictures online for some years, and they are offering developers a nice API, which means that we can use many of their functions in our own solutions. In this case, we are going to use it to grab the latest pictures from a Flickr group. But how? With <a
title="Json" href="http://jquery.com/" target="_blank">JSON</a> (JavaScript Object Notation). <a
title="Jquery" href="http://jquery.com/">Jquery</a> is able to transfer data between domains, and this means that with a little code, we can use this to show our pictures from the rss feed from the Flickr group.</p><p>I&#8217;ve put together an example on how to do this (you can download this as a .zip file at the bottom of the article).</p><p>What you need to pull this together is:</p><ul><li><a
title="Jquery" href="http://jquery.com/" target="_blank">Jquery</a></li><li>A couple of lines in your htm file</li><li>Another couple of lines in your css document</li><li>A Flickr rss (doesn&#8217;t have to be yours, just a Flickr rss)</li></ul><p>This is the code you need to put in your htm file (in the head tag):</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('p38code15'); return false;">View Code</a> HTML4STRICT</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p3815"><td
class="code" id="p38code15"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</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;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;My style&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;screen&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jsonstylesheet.css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/jquery-1.2.6.pack.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div><p>And put this where you want inside the body tag (change the url to your own Flickr Rss feed):</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('p38code16'); return false;">View Code</a> JAVASCRIPT</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p3816"><td
class="code" id="p38code16"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
$.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://api.flickr.com/services/feeds/groups_pool.gne?id=807213@N20&amp;lang=en-us&amp;format=json&amp;jsoncallback=?&quot;</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: #660066;">each</span><span style="color: #009900;">&#40;</span>data.<span style="color: #660066;">items</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;img/&gt;&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;src&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">media</span>.<span style="color: #660066;">m</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#images&quot;</span><span style="color: #009900;">&#41;</span>
      .<span style="color: #660066;">wrap</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;a href='http://www.csstemplatesweb.com/ajax-articles/json-flickr-feed-example/'&gt;&lt;/a&gt;&quot;</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;">&#40;</span><span style="color: #3366CC;">&quot;#title&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>data.<span style="color: #660066;">title</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#description&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>data.<span style="color: #660066;">description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#link&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;a href='http://www.csstemplatesweb.com/ajax-articles/json-flickr-feed-example/' target=<span style="color: #000099; font-weight: bold;">\&quot;</span>_blank<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Click here to get to the Flickr group&lt;/a&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #006600; font-style: italic;">//Notice that the object here is &quot;data&quot; because that information sits outside of &quot;items&quot; in the JSON feed</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div><p>You also need to put this into your body tag (where you want the images to show):</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('p38code17'); return false;">View Code</a> HTML4STRICT</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p3817"><td
class="code" id="p38code17"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Only the last 20 pictures added to the Flickr group will show. To check out all the pictures, go to the Flickr group here:<span style="color: #009900;">&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;">p</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;link&quot;</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;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div><p>To add some styling, add this in you css file:</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('p38code18'); return false;">View Code</a> CSS</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p3818"><td
class="code" id="p38code18"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#images</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">500px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#images</span> img <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div><p>That&#8217;s it!</p><p>Here is a little screenshot on how it will look. Of course, you can style it the way you want with css.</p><p><a
href="http://www.csstemplatesweb.com/wp-content/uploads/2008/07/flickrfeedexamplejson.jpg"><img
class="alignleft size-medium wp-image-39" title="Flickr Feed example with Json" src="http://www.csstemplatesweb.com/wp-content/uploads/2008/07/flickrfeedexamplejson-273x300.jpg" alt="Flickr Feed example with Json" width="273" height="300" /></a></p><p>You can download the zip file, containing all you need.</p> Note: There is a file embedded within this post, please visit this post to download the file.<p>You can also buy the &#8220;Personal homepage&#8221; css template, containing this function (only a bit more fancy), plus it integrates feeds from both Twitter and Delicious as well.</p> ]]></content:encoded> <wfw:commentRss>http://www.csstemplatesweb.com/ajax-articles/json-flickr-feed-example/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>What is ajax</title><link>http://www.csstemplatesweb.com/ajax-articles/what-is-ajax/</link> <comments>http://www.csstemplatesweb.com/ajax-articles/what-is-ajax/#comments</comments> <pubDate>Thu, 28 Feb 2008 10:23:13 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Ajax Articles]]></category> <category><![CDATA[ajax]]></category> <category><![CDATA[html]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[web]]></category> <category><![CDATA[xhtml]]></category><guid
isPermaLink="false">http://www.csstemplatesweb.com/2008/02/28/what-is-ajax/</guid> <description><![CDATA[AJAX (Asynchronous JavaScript and XML), or Ajax, is a group of inter-related web development techniques used for creating interactive web applications. A primary characteristic is the increased responsiveness and interactivity of web pages achieved by exchanging small amounts of data with the server &#8220;behind the scenes&#8221; so that entire web pages do not have to [...]]]></description> <content:encoded><![CDATA[<p><strong>AJAX</strong> (<strong>A</strong>synchronous <a
href="http://en.wikipedia.org/wiki/JavaScript" title="JavaScript"><strong>J</strong>avaScript</a> <strong>a</strong>nd <a
href="http://en.wikipedia.org/wiki/XML" title="XML"><strong>X</strong>ML</a>), or <strong>Ajax</strong>, is a group of inter-related <a
href="http://en.wikipedia.org/wiki/Web_development" title="Web development">web development</a> techniques used for creating interactive <a
href="http://en.wikipedia.org/wiki/Web_application" title="Web application">web applications</a>. A primary characteristic is the increased responsiveness and interactivity of web pages achieved by exchanging small amounts of data with the server &#8220;behind the scenes&#8221; so that entire web pages do not have to be reloaded each time there is a need to fetch data from the server. This is intended to increase the web page&#8217;s interactivity, speed, functionality, and <a
href="http://en.wikipedia.org/wiki/Usability" title="Usability">usability</a>.</p><p>AJAX is <a
href="http://en.wikipedia.org/wiki/Asynchronous" class="mw-redirect" title="Asynchronous">asynchronous</a>; in that extra data is requested from the server and loaded in the background without interfering with the display and behavior of the existing page. <a
href="http://en.wikipedia.org/wiki/JavaScript" title="JavaScript">JavaScript</a> is the <a
href="http://en.wikipedia.org/wiki/Scripting_language" title="Scripting language">scripting language</a> in which AJAX function calls are usually made.<sup
id="_ref-0" class="reference"><a
href="http://en.wikipedia.org/wiki/AJAX#_note-0">[1]</a></sup> Data is retrieved using the <em><a
href="http://en.wikipedia.org/wiki/XMLHttpRequest" title="XMLHttpRequest">XMLHttpRequest</a></em> <a
href="http://en.wikipedia.org/wiki/Object_%28computer_science%29" title="Object (computer science)">object</a> that is available to scripting languages run in modern browsers, or alternatively <a
href="http://en.wikipedia.org/wiki/Remote_Scripting" title="Remote Scripting">Remote Scripting</a> in browsers that do not support XMLHttpRequest. There is, however, no requirement that the asynchronous content be formatted in <a
href="http://en.wikipedia.org/wiki/XML" title="XML">XML</a>.</p><p>AJAX is a <a
href="http://en.wikipedia.org/wiki/Cross-platform" title="Cross-platform">cross-platform</a> technique usable on many different <a
href="http://en.wikipedia.org/wiki/Operating_system" title="Operating system">operating systems</a>, <a
href="http://en.wikipedia.org/wiki/Computer_architecture" title="Computer architecture">computer architectures</a>, and <a
href="http://en.wikipedia.org/wiki/Web_browser" title="Web browser">web browsers</a> as it is based on <a
href="http://en.wikipedia.org/wiki/Open_standards" class="mw-redirect" title="Open standards">open standards</a> such as JavaScript and the <a
href="http://en.wikipedia.org/wiki/Document_Object_Model" title="Document Object Model">DOM</a>. There are <a
href="http://en.wikipedia.org/wiki/Free_software" title="Free software">free</a> and <a
href="http://en.wikipedia.org/wiki/Open_source_software" title="Open source software">open source</a> implementations of suitable <a
href="http://en.wikipedia.org/wiki/Software_framework" title="Software framework">frameworks</a> and <a
href="http://en.wikipedia.org/wiki/List_of_JavaScript_libraries" class="mw-redirect" title="List of JavaScript libraries">libraries</a>.</p><h2><span
class="mw-headline">Constituent technologies</span></h2><p>AJAX uses a combination of:</p><ul><li><a
href="http://en.wikipedia.org/wiki/XHTML" title="XHTML">XHTML</a> (or <a
href="http://en.wikipedia.org/wiki/HTML" title="HTML">HTML</a>) and <a
href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" title="Cascading Style Sheets">CSS</a>, for marking up and styling information.</li><li>The <a
href="http://en.wikipedia.org/wiki/Document_Object_Model" title="Document Object Model">DOM</a> accessed with a <a
href="http://en.wikipedia.org/wiki/Client-side" title="Client-side">client-side</a> <a
href="http://en.wikipedia.org/wiki/Scripting_language" title="Scripting language">scripting language</a>, especially <a
href="http://en.wikipedia.org/wiki/ECMAScript" title="ECMAScript">ECMAScript</a> <a
href="http://en.wikipedia.org/wiki/Implementation" title="Implementation">implementations</a> such as <a
href="http://en.wikipedia.org/wiki/JavaScript" title="JavaScript">JavaScript</a> and <a
href="http://en.wikipedia.org/wiki/JScript" title="JScript">JScript</a>, to dynamically display and interact with the information presented.</li><li>The <a
href="http://en.wikipedia.org/wiki/XMLHttpRequest" title="XMLHttpRequest">XMLHttpRequest</a> object is used to exchange data asynchronously with the web server. In some <a
href="http://en.wikipedia.org/wiki/Ajax_framework" title="Ajax framework">Ajax frameworks</a> and in certain situations, an <a
href="http://en.wikipedia.org/wiki/IFrame" title="IFrame">IFrame</a> object is used instead of the XMLHttpRequest object to exchange data with the web server, and in other implementations, dynamically added <code>&lt;<a
href="http://en.wikipedia.org/wiki/Client-side_JavaScript" title="Client-side JavaScript">script</a>&gt;</code> tags may be used.</li><li>XML is sometimes used as the <a
href="http://en.wikipedia.org/wiki/File_format" title="File format">format</a> for transferring data between the server and client, although any format will work, including preformatted HTML, plain text and <a
href="http://en.wikipedia.org/wiki/JavaScript_Object_Notation" class="mw-redirect" title="JavaScript Object Notation">JSON</a>. These files may be created dynamically by some form of <a
href="http://en.wikipedia.org/wiki/Server-side_scripting" title="Server-side scripting">server-side scripting</a>.</li></ul><p>Like <a
href="http://en.wikipedia.org/wiki/DHTML" class="mw-redirect" title="DHTML">DHTML</a>, <a
href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29" title="LAMP (software bundle)">LAMP</a>, and <a
href="http://en.wikipedia.org/w/index.php?title=Single_page_application&amp;action=edit&amp;redlink=1" class="new" title="Single page application (not yet written)">SPA</a>, Ajax is not a technology in itself, but a term that refers to the use of a group of technologies.</p><p>The &#8220;core&#8221; and defining element of Ajax is the XMLHttpRequest object, which gives browsers the ability to make dynamic and asynchronous data requests without having to reload a page, eliminating the need for page refreshes.</p><p>Besides XMLHttpRequest, the use of DOM, CSS, and JavaScript provides a richer &#8220;single-page&#8221; experience.</p><p>[Source: <a
href="http://en.wikipedia.org/wiki/AJAX" title="wikipedia">wikipedia</a>]</p> ]]></content:encoded> <wfw:commentRss>http://www.csstemplatesweb.com/ajax-articles/what-is-ajax/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 18/24 queries in 0.084 seconds using disk
Object Caching 995/1001 objects using disk

Served from: www.csstemplatesweb.com @ 2010-07-30 19:48:50 -->