<?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>Developer Code book &#187; Ajax</title> <atom:link href="http://wordpressapi.com/category/javascript/ajax/feed/" rel="self" type="application/rss+xml" /><link>http://wordpressapi.com</link> <description>Wordpressapi.com is focused on Wordpress API, wordpress news, wordpress themes, wordpress plugins, wordpress tips, wordpress tutorials, wordpress design wordpress templates, wordpress breaking news and web-development. We deliver useful information about wordpress,  wordpress latest trends and wordpress techniques, wordpress useful ideas, wordpress innovative approaches and wordpress tools. Social Media news blog covering cool new websites and social networks: Facebook, Google, Twitter, MySpace and YouTube.  The latest web technology news, via RSS daily.</description> <lastBuildDate>Sun, 05 Sep 2010 06:21:54 +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>Really Simple History – History for Ajax</title><link>http://wordpressapi.com/2010/08/02/really-simple-history-for-ajax/</link> <comments>http://wordpressapi.com/2010/08/02/really-simple-history-for-ajax/#comments</comments> <pubDate>Mon, 02 Aug 2010 06:19:45 +0000</pubDate> <dc:creator>Sony</dc:creator> <category><![CDATA[Ajax]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[history]]></category><guid
isPermaLink="false">http://purab.wordpress.com/?p=15</guid> <description><![CDATA[Ajax (pronounced /ˈeɪˌdʒæks/) (shorthand for Asynchronous JavaScript  and XML) is a group of interrelated web development techniques used on the client-side  to create interactive web applications. With Ajax, web applications can retrieve data from the server  asynchronously in the background without interfering with the display and behavior of the existing page. The use of Ajax.....]]></description> <content:encoded><![CDATA[<p><img
class="alignnone size-full wp-image-4985" title="ajax-image" src="http://wordpressapi.com/files/ajax-image.jpg" alt="" width="316" height="159" /></p><p>Ajax (pronounced /ˈeɪˌdʒæks/) (shorthand for Asynchronous JavaScript  and XML) is a group of interrelated web development techniques used on the client-side  to create interactive web applications. With Ajax, web applications can retrieve data from the server  asynchronously in the background without interfering with the display and behavior of the existing page. The use of Ajax techniques has led to an increase in interactive or dynamic interfaces on web pages. Data is usually retrieved using the XMLHttpRequest object. Despite the name, the use of XML is not actually required, nor do the requests need to be asynchronous.</p><p>If you’re working on Ajax based websites, you’ll always face usability problems when users click on the Back or Forward buttons on the broswer. Using Really Simple History (RSH) allows you over come this issue.</p><p><em>The Really Simple History (RSH) framework makes it easy for AJAX applications to incorporate bookmarking and back and button support. By default, AJAX systems are not bookmarkable, nor can they recover from the user pressing the browser’s back and forward buttons. The RSH library makes it possible to handle both cases.</em></p><p><em>In addition, RSH provides a framework to cache transient session information that persists after a user leaves the web page. This cache is used by the RSH framework to help with history issues, but can also be used by your own applications to improve application performance. The cache is linked to a single instance of the web page, and will disappear when the user closes their browser or clear their browser’s cache.</em></p><p><em>RSH works on Internet Explorer 6+ and Gecko-based browsers, like Firefox. Safari is not supported.</em></p><p>Link: <a
href="http://codinginparadise.org/projects/dhtml_history/#what">Really Simple History</a><br
/> Demo Link: <a
href="http://codinginparadise.org/projects/dhtml_history/testDhtmlHistory.html">testDhtmlHistory.html</a> (try using the browser back button after you get to this demo)</p> ]]></content:encoded> <wfw:commentRss>http://wordpressapi.com/2010/08/02/really-simple-history-for-ajax/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>How to use document.write and innerhtml</title><link>http://wordpressapi.com/2010/02/23/document-write-innerhtml/</link> <comments>http://wordpressapi.com/2010/02/23/document-write-innerhtml/#comments</comments> <pubDate>Tue, 23 Feb 2010 17:14:18 +0000</pubDate> <dc:creator>Sony</dc:creator> <category><![CDATA[Ajax]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[javascript hack]]></category> <category><![CDATA[javascript technique]]></category><guid
isPermaLink="false">http://wordpressapi.com/?p=1472</guid> <description><![CDATA[document.write and innerhtml both the functions are useful to adding the dynamic content in in Document. Both function are many times used by developer in javascript functions, Ajax calls, Web services and many JS libraries. So We need understand the similarities and differences and limitation about document.write and innerhtml. First whenever and where you calls.....]]></description> <content:encoded><![CDATA[<p>document.write and innerhtml both the functions are useful to adding the dynamic content in in Document.</p><p>Both function are many times used by developer in javascript functions, Ajax calls, Web services and many JS libraries.</p><p>So We need understand the similarities and differences and limitation about document.write and innerhtml.</p><p>First whenever and where you calls document.write function that more important.</p><p>Here I am going to show you how to use the document.write first.</p><pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;

var hello_world = function() {
document.write('Wordpressapi is good website'); // print hello world in DOM

var mytext = &quot;Wordpressapi is best website&quot;;
document.write(mytext); // print again through variable.

}
&lt;/script&gt;
</pre><p>Using above code you can print or execute the so much HTML content in DOM.</p><p>Here I am going to show you how to use the innerHTML in DOM.</p><pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;
document.getElementById('sample_Div').innerHTML=&quot;Wordpressapi is good website&quot;; // add simple text
//document.getElementById('sample_Div').innerHTML=&quot;&lt;img src=sample.jpg&gt;&lt;/img&gt;&quot;; // add image
&lt;/script&gt;
</pre><p>Note: In your document &#8220;sample_Div&#8221; id with div need to be present.<br
/> put following code in your document.</p><pre class="brush: xml;">
&lt;div id=\&quot;sample_Div\&quot;&gt;
Sample Text
&lt;/div&gt;
</pre><p>Loading iframe using innerhtml is the best techniqe and solution for web services and cross domain calls.</p><pre>
document.getElementById('sample_Div').innerHTML = "&lt;iframe src='http://wordpressapi.com/'&gt;&lt;/iframe&gt;";
</pre><p>Both the techniques are stand for as per situation and use</p><p><a
href="http://wordpressapi.com/files/ajax.png"><img
class="alignnone size-full wp-image-1475" title="ajax" src="http://wordpressapi.com/files/ajax.png" alt="" width="300" height="300" /></a></p> ]]></content:encoded> <wfw:commentRss>http://wordpressapi.com/2010/02/23/document-write-innerhtml/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Execute JavaScript functions in innerHTML</title><link>http://wordpressapi.com/2010/02/23/execute-javascript-functions-innerhtml/</link> <comments>http://wordpressapi.com/2010/02/23/execute-javascript-functions-innerhtml/#comments</comments> <pubDate>Tue, 23 Feb 2010 16:49:41 +0000</pubDate> <dc:creator>Sony</dc:creator> <category><![CDATA[Ajax]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[tutorials]]></category> <category><![CDATA[javascript hack]]></category> <category><![CDATA[javascript technique]]></category><guid
isPermaLink="false">http://wordpressapi.com/?p=1466</guid> <description><![CDATA[There is big issue We found with innerHTML function. If you try to execute javascript in innerHTML content then we will face this problem with various. We need to always care about Cross browser issues with javascript method. For Ajax and adding the dynamically content in DOM we have actually we ways. First is simple.....]]></description> <content:encoded><![CDATA[<p>There is big issue We found with innerHTML function. If you try to execute javascript in innerHTML content then we will face this problem with various.<br
/> We need to always care about Cross browser issues with javascript method.</p><p>For Ajax and adding the dynamically content in DOM we have actually we ways.<br
/> First is simple document.write function and second function is using innerHTML.</p><p>There is some cross browser issues with both the method. First I will talk about document.write.<br
/> If we use document.write in our DOM then there is no control over the content which we are adding through document.write</p><p>Basically when we use document.write then this function will execute or add the HTML content in DOM where we call this function.</p><p>If you want to avoid this this behavior I suggest use the innerHTML. But innerHTML method is also having some issues with nested innerHTML executing with 2 or 3 level with Major browsers.<br
/> Microsoft is now planning to launch the IE9 version. But in that version they are not supporting this kind of functionality.</p><p>So Major JS library developer need to think about new approach which will give some good alternate solution.</p><p>We can achieve the nested innerHTML but we need to do some very complex development in javascript.</p><p>With innerHTML method: The property is read/write for all objects except the following, for which it is read-only:<br
/> COL, COLGROUP, FRAMESET, HTML, STYLE, TABLE, TBODY, TFOOT, THEAD, TITLE, TR. The property has no default value. Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer<br
/> 5.</p><p>In this article I am going to give example about executing the simple javascript function in innerHTML.</p><pre class="brush: jscript;">&lt;br /&gt;function add_cont() {&lt;br /&gt;var html_cont = '&amp;lt;a href=&quot;javascript:alert(\'hello world\')&quot;&amp;gt;click for hello world test&amp;lt;/a&amp;gt;'+&lt;br /&gt; '&amp;lt;script&amp;gt; alert(\'tests\');'+&lt;br /&gt;'var wordpressapi = document.createElement(&quot;div&quot;);'+&lt;br /&gt;'wordpressapi.innerHTML = &quot;some ad&quot;;&amp;lt;\/script&amp;gt;'&lt;br /&gt;;&lt;br /&gt;document.getElementById('test_htm').innerHTML = html_cont;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&quot;test_htm&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;a href=&quot;javascript:add_cont()&quot;&amp;gt;Insert test div and text with javascript on click event.&amp;lt;/a&amp;gt;&lt;br /&gt;</pre><p>Other best solution is all the tradtional but still trusted.</p><pre class="brush: jscript;">&lt;br /&gt;document.write(&quot;&amp;lt;iframe src='inner_cont.html'&amp;gt;&quot;);&lt;br /&gt;// ... Javascript code will goes here... //&lt;br /&gt;document.write(&quot;&amp;lt;/iframe&amp;gt;&quot;);&lt;br /&gt;</pre><p><a
href="http://wordpressapi.com/files/javascript-hacking.jpg"><img
class="alignnone size-medium wp-image-1467" title="javascript-hacking" src="http://wordpressapi.com/files/javascript-hacking-238x300.jpg" alt="" width="238" height="300" /></a><br
/> I am still working on this issue to for adding nested innerHTML content.</p> ]]></content:encoded> <wfw:commentRss>http://wordpressapi.com/2010/02/23/execute-javascript-functions-innerhtml/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>get time difference in minutes</title><link>http://wordpressapi.com/2009/10/07/get-time-difference-in-minutes/</link> <comments>http://wordpressapi.com/2009/10/07/get-time-difference-in-minutes/#comments</comments> <pubDate>Wed, 07 Oct 2009 12:58:12 +0000</pubDate> <dc:creator>Sony</dc:creator> <category><![CDATA[Ajax]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[date]]></category> <category><![CDATA[minutes]]></category> <category><![CDATA[time]]></category><guid
isPermaLink="false">http://purab.wordpress.com/2009/10/07/get-time-difference-in-minutes/</guid> <description><![CDATA[I created javascript function named &#8220;getTheDiffTime&#8221; using that function you will be able to fetch the time difference in various format. function getTheDiffTime(dateone, datetwo,format){ //format = &#34;Days&#34;, Hours, Minutes, Seconds if(dateone &#62; datetwo) { var seconds = dateone.getTime() - datetwo.getTime(); } else { var seconds = datetwo.getTime() - dateone.getTime(); } var second = 1000, minute.....]]></description> <content:encoded><![CDATA[<p>I created javascript function named &#8220;getTheDiffTime&#8221; using that function you will be able to fetch the time difference in various format.</p><pre class="brush: jscript;">

function getTheDiffTime(dateone, datetwo,format){
//format = &quot;Days&quot;, Hours, Minutes, Seconds
if(dateone &gt; datetwo) {
var seconds = dateone.getTime() - datetwo.getTime();
} else {
var seconds = datetwo.getTime() - dateone.getTime();
}
var second = 1000, minute = 60 * second, hour = 60 * minute, day = 24 * hour;
if(format==&quot;Days&quot;){
var rformat = Math.floor(seconds / day);
seconds -= rformat * day;
//alert(&quot;days: &quot;+rformat);
}else if(format==&quot;Hours&quot;){
// find the hours
rformat = translate(seconds / hour);
//alert(&quot;hours: &quot;+rformat);
}else if (format==&quot;Minutes&quot;){
//find the mintues
rformat= translate(seconds / minute);
//alert(&quot;minutes: &quot;+ rformat);
}else if(format==&quot;Seconds&quot;){
//find the seconds
rformat = translate(seconds / second);
//alert(&quot;seconds: &quot;+rformat);
}

return rformat
//alert(rformat);

}
</pre><p>How to use this function here I am giving you the one good example.</p><p>I am going to get the current months minutes using this function.</p><pre class="brush: jscript;">

//for calculating the current month in mintue -script
currentMonth = new Date();
plus_oneMonth = new Date();
plus_oneMonth.setMonth(plus_oneMonth.getMonth()+1);

getTheDiffTime(plus_oneMonth,currentMonth,&quot;Minutes&quot;);
</pre><p>You will get return the minutes.</p> ]]></content:encoded> <wfw:commentRss>http://wordpressapi.com/2009/10/07/get-time-difference-in-minutes/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>AJAX Login Demo</title><link>http://wordpressapi.com/2007/09/15/ajax-login-demo/</link> <comments>http://wordpressapi.com/2007/09/15/ajax-login-demo/#comments</comments> <pubDate>Sat, 15 Sep 2007 07:20:07 +0000</pubDate> <dc:creator>Sony</dc:creator> <category><![CDATA[Ajax]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://purab.wordpress.com/?p=17</guid> <description><![CDATA[Here’s a demo of a login system built using Ajax. This is a cool implementation which allows a user to login, without having to refresh the page. Here are some advantages of the noted by author of the code: User does not need to refresh the page to login. User is notified instantly on incorrect.....]]></description> <content:encoded><![CDATA[<p>Here’s a demo of a login system built using Ajax. This is a cool implementation which allows a user to login, without having to refresh the page. Here are some advantages of the noted by author of the code:</p><ul><li>User does not need to refresh the page to login.</li><li>User is notified instantly on incorrect username/password combination.</li><li>Overall user experience is more seamless.</li><li>Password is not sent in plain text ever (more secure than traditional system).</li><li>Javascript convenience with server-side security (uses PHP/MySQL).</li><li>Uses one-time use random seed to hash the password before sending (making interceptions useless)</li></ul><p>Source code for the login form is also available on the site.</p><p>Link: <a
href="http://www.jamesdam.com/ajax_login/login.html#login">JamesDam.com ≈ AJAX Login System Demo</a></p> ]]></content:encoded> <wfw:commentRss>http://wordpressapi.com/2007/09/15/ajax-login-demo/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Usability for Rich Internet Applications</title><link>http://wordpressapi.com/2007/09/15/usability-for-rich-internet-applications/</link> <comments>http://wordpressapi.com/2007/09/15/usability-for-rich-internet-applications/#comments</comments> <pubDate>Sat, 15 Sep 2007 07:19:56 +0000</pubDate> <dc:creator>Sony</dc:creator> <category><![CDATA[Ajax]]></category> <category><![CDATA[flash]]></category> <category><![CDATA[flex]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[RIA]]></category><guid
isPermaLink="false">http://purab.wordpress.com/?p=16</guid> <description><![CDATA[Here’s a good article on design patterns for RIA. “Rich Internet applications (RIAs) can provide opportunities to design much better user experiences. They can be faster, more engaging and much more usable. However, this improvement is not without its downside—RIAs are much more difficult to design than the previous generation of page-based applications. The richer.....]]></description> <content:encoded><![CDATA[<p>Here’s a good article on design patterns for RIA.<br
/> <em>“Rich Internet applications (RIAs) can provide opportunities to design much better user experiences. They can be faster, more engaging and much more usable. However, this improvement is not without its downside—RIAs are much more difficult to design than the previous generation of page-based applications. The richer interaction requires a better understanding of users and of human-computer interaction (HCI). Although there is a lot of <span
class="caps">HCI</span> material and research available, it can be difficult to determine how it applies to this new environment.”</em></p><p>Link: <a
href="http://www.digital-web.com/articles/usability_for_rich_internet_applications/"> Usability for Rich Internet Applications</a></p> ]]></content:encoded> <wfw:commentRss>http://wordpressapi.com/2007/09/15/usability-for-rich-internet-applications/feed/</wfw:commentRss> <slash:comments>2</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 53/81 queries in 0.160 seconds using disk

Served from: wordpressapi.com @ 2010-09-07 13:22:04 -->