<?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>All About Web &#38; Mobile Application Development &#187; ajax.updater</title>
	<atom:link href="http://www.londatiga.net/tag/ajaxupdater/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.londatiga.net</link>
	<description>All About Web &#38; Mobile Application Development</description>
	<lastBuildDate>Sat, 14 Jan 2012 16:56:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</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>Prototype: Using Ajax.Updater to Update Browser&#8217;s DOM Element</title>
		<link>http://www.londatiga.net/it/prototype-using-ajax-updater-to-update-browsers-dom-element/</link>
		<comments>http://www.londatiga.net/it/prototype-using-ajax-updater-to-update-browsers-dom-element/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 18:12:59 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ajax.updater]]></category>
		<category><![CDATA[browser dom update]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[dom update after ajax request]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[update dom]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=139</guid>
		<description><![CDATA[Ajax has become popular since it allows web application to behave interactively like a desktop application. It allows asynchronous communication between client (browser) and server so web applications can retrieve data from server  in the background without interfering with the display and behavior of the existing page.
There are some javascript frameworks available over internet that help [...]]]></description>
			<content:encoded><![CDATA[<p>Ajax has become popular since it allows web application to behave interactively like a desktop application. It allows asynchronous communication between client (browser) and server so web applications can retrieve data from server  in the background without interfering with the display and behavior of the existing page.</p>
<p>There are some javascript frameworks available over internet that help us to build web application easier using ajax like Prototype,  Jquery,  Dojo, etc.  For me, i prefer to use prototype because of  it&#8217;s functionality and easy to use. I&#8217;ve been using Prototype for over one year and feel comfort with it.</p>
<p>In ajax programming, we often use ajax to update parts within HTML page with the data retrived from server where in prototype i use <strong>Ajax.Request</strong> function to handle it.  But in some cases,  if  our ajax response data  contains other java script code,  and we want the script to work after the response, it won&#8217;t work.  It happens because the browser&#8217;s DOM is not updated with the newly retrieved script from ajax response. To overcome this problem, we can use <strong>Ajax.Updater</strong> function that&#8217;s a spesialization of Ajax.Request function.</p>
<p>The function:</p>
<blockquote><p><strong>new Ajax.Updater(container, url[, options])</strong></p></blockquote>
<p>where <em>container</em> is the HTML part to be updated and <em>url </em>is url to server side script.</p>
<p>Options:</p>
<table border="0">
<tbody>
<tr>
<td width="100"><strong>Options</strong></td>
<td width="100"><strong>Default</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td style="width: 100px;">evalScripts</td>
<td>false</td>
<td>This determines whether <code>&lt;script&gt;</code> elements in the response  text are evaluated or not.By default, <a><code>Element.update</code></a> is  used, which replaces the whole contents of the container with the response text</td>
</tr>
<tr>
<td>insertion</td>
<td>None</td>
<td>As of Prototype 1.6.0, this notation is deprecated. Simply pass either  <code>'top'</code>, <code>'bottom'</code>, <code>'before'</code> or  <code>'after'</code> as a string instead</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<pre class="brush: jscript; title: ;">
var url = 'ajax.php';

var myAjax = new Ajax.Updater('datadiv', url, {
      method: 'get',
      evalScripts: true,

      onSuccess: function(transport) {},

      onFailure: function(transport) {
           alert('Transport error!');
       }
 });
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/it/prototype-using-ajax-updater-to-update-browsers-dom-element/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

