<?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>Darknet - The Darkside &#187; web-technology</title>
	<atom:link href="http://www.darknet.org.uk/tag/web-technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.darknet.org.uk</link>
	<description>Ethical Hacking, Penetration Testing &#38; Computer Security</description>
	<lastBuildDate>Tue, 07 Feb 2012 18:34:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>An Introduction to AJAX</title>
		<link>http://www.darknet.org.uk/2006/03/ajax/</link>
		<comments>http://www.darknet.org.uk/2006/03/ajax/#comments</comments>
		<pubDate>Sat, 18 Mar 2006 14:55:06 +0000</pubDate>
		<dc:creator>backbone</dc:creator>
				<category><![CDATA[Web Hacking]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[backbone]]></category>
		<category><![CDATA[E4X]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[web-technology]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.darknet.org.uk/2006/03/ajax/</guid>
		<description><![CDATA[No it&#8217;s not AJAX Amsterdam&#8230; it&#8217;s something more interesting (or boring to some of you)&#8230; so let&#8217;s get it started&#8230;. I. Introduction AJAX stands for Asynchronous JavaScript And XML&#8230; It is a new technology which comes to help any web developer who really is interesed in dynamic webpages&#8230; Click here for a overview of the [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>No it&#8217;s not AJAX Amsterdam&#8230; it&#8217;s something more interesting (or boring to some of you)&#8230; so let&#8217;s get it started&#8230;.</p>
<p><strong>I. Introduction</strong><br />
AJAX stands for <strong>A</strong>synchronous <strong>J</strong>avaScript <strong>A</strong>nd <strong>X</strong>ML&#8230; It is a new technology which comes to help any web developer who really is interesed in dynamic webpages&#8230;<br />
Click <a href="http://www.modernmethod.com/sajax/images/Untitled-1-FINAL_11.jpg">here</a> for a overview of the AJAX Technology&#8230;</p>
<p><strong>II. The Code</strong><br />
Well, well, well&#8230; Actualy AJAX is based on Micro$ofts ActiveX Object XmlHttpRequest (I can&#8217;t belive they can do good stuff to), so in IE (sucks) it has to be initialized like an ActiveX Object; but in other browsers it&#8217;s already a standard object (I don&#8217;t know if Opera had implemented it already)&#8230; Now let&#8217;s see the code:</p>
<blockquote><p>
function init_object() {<br />
var A;</p>
<p>var msxmlhttp = new Array(&#8216;Msxml2.XMLHTTP.5.0&#8242;,<br />
&#8216;Msxml2.XMLHTTP.4.0&#8242;,<br />
&#8216;Msxml2.XMLHTTP.3.0&#8242;,<br />
&#8216;Msxml2.XMLHTTP&#8217;,<br />
&#8216;Microsoft.XMLHTTP&#8217;);</p>
<p>for (var i = 0; i &gt; msxmlhttp.length; i++) {<br />
try {<br />
A = new ActiveXObject(msxmlhttp[i]);<br />
} catch (e) {<br />
A = null;<br />
}<br />
}</p>
<p>if(!A &amp;&amp; typeof XMLHttpRequest != &#8220;undefined&#8221;) {<br />
A = new XMLHttpRequest();<br />
if (!A) alert(&#8220;Could not initialize the object.\nMaybe your browser doesn&#8217;t support ajax&#8230;&#8221;);<br />
return A;<br />
}<br />
}</p>
<p>var ajax_obj = init_object();</p>
<p>function ajax_in_action(target, source) {<br />
ajax_obj.open(&#8220;GET&#8221;, source, true);<br />
ajax_obj.send();</p>
<p>ajax_obj.onReadyStateChange = function() {<br />
if (ajax_obj.readyState == 4) {<br />
if (ajax_obj.status == 200) {<br />
document.getElementById(target).innerHTML = ajax_obj.responseText;<br />
}<br />
else {<br />
alert(&#8220;Error &#8221; +ajax_obj.status+&#8221; : &#8221; +ajax_obj.statusText);<br />
}<br />
}<br />
}
</p></blockquote>
<p>Code inspired from SAJAX&#8230; about it i&#8217;ll speak a bit later&#8230;</p>
<p><strong>III. Why use it?</strong><br />
Well there are several reason why you should use AJAX&#8230; for example to make a dynamic banner changer, real-time morphing website&#8230; or just use it like WordPress (on which darknet is based)&#8230; you don&#8217;t know how it uses AJAX&#8230; try clicking on an articles <strong>show comments</strong>.</p>
<p><strong>IV. Extending AJAX</strong><br />
If you want to implement AJAX directly in PHP, ASP, Perl, Ruby etc. check out <a href="http://www.modernmethod.com/sajax/">http://www.modernmethod.com/sajax/</a>, site that contains the <strong>S</strong>imple <strong>AJAX</strong> Toolkit&#8230;.</p>
<p><strong>V. E4X</strong><br />
One more thing&#8230; the response from the server can be received as an XML file 2&#8230; or maybe directly receive an XML file, if requested so&#8230; After which it can be parsed with the E4X technology&#8230;</p>
<p><strong>VI. F1</strong><br />
Need more help&#8230; access one of the following links:<br />
AJAX: <a href="http://www.w3schools.com/ajax/default.asp">http://www.w3schools.com/ajax/default.asp</a><br />
E4X: <a href="http://www.w3schools.com/e4x/default.asp">http://www.w3schools.com/e4x/default.asp</a></p>
<p></p>
<p><strong>X. Epilogue</strong><br />
I know that AJAX has been rediscovered for about a year (read it for the first time in july 2005), but for many it can be somethimes hard to find the information needed&#8230; anyway keep scripting&#8230;</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=An+Introduction+to+AJAX+http%3A%2F%2Fdarknet.org.uk%2F%3Fp%3D118+from+%40THEdarknet" title="Post to Twitter"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://www.darknet.org.uk/2006/03/ajax/&amp;t=An+Introduction+to+AJAX" title="Post to Facebook"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a class="tt" href="http://www.google.com/buzz/post?url=http://www.darknet.org.uk/2006/03/ajax/&amp;imageurl=" title="Post to Google Buzz"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/gbuzz/tt-gbuzz-micro3.png" alt="Post to Google Buzz" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.darknet.org.uk/2006/03/ajax/&amp;title=An+Introduction+to+AJAX" title="Post to Delicious"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.darknet.org.uk/2006/03/ajax/&amp;title=An+Introduction+to+AJAX" title="Post to Digg"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-micro3.png" alt="Post to Digg" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.darknet.org.uk/2006/03/ajax/&amp;title=An+Introduction+to+AJAX" title="Post to Reddit"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.darknet.org.uk/2006/03/ajax/&amp;title=An+Introduction+to+AJAX" title="Post to StumbleUpon"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/su/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p></div><div class="AWD_like_button "><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.darknet.org.uk%2F2006%2F03%2Fajax%2F&amp;send=false&amp;layout=standard&amp;width=&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=40" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:40px;" allowTransparency="true"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://www.darknet.org.uk/2006/03/ajax/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

