<?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>Ajax Plus - Tips and tutorial for Ajax &#187; Ajax Tools</title>
	<atom:link href="http://www.ajaxplus.net/category/ajax-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ajaxplus.net</link>
	<description>All you need to know about Ajax</description>
	<lastBuildDate>Wed, 03 Feb 2010 12:17:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ajax tip: Use JSON format</title>
		<link>http://www.ajaxplus.net/2010/02/03/ajax-tip-use-json-format/</link>
		<comments>http://www.ajaxplus.net/2010/02/03/ajax-tip-use-json-format/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 12:17:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax Tools]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://www.ajaxplus.net/?p=17</guid>
		<description><![CDATA[  Hi all,
The benefit of JSON on other formats is that it is recognized natively by JavaScript. This is huge advantage because you don&#8217;t need to write a code for parsing an XML document to extract the data and get it throught the net. So it saves time and it is faster.
The JSON format is [...] ]]></description>
			<content:encoded><![CDATA[<p> Hi all,</p>
<p>The benefit of <a class="zem_slink" title="JSON" rel="homepage" href="http://json.org">JSON</a> on other formats is that it is recognized natively by JavaScript. This is huge advantage because you don&#8217;t need to write a code for parsing an XML document to extract the data and get it throught the net. So it saves time and it is faster.</p>
<p>The JSON format is very simple:</p>
<pre>{
  "menu": "File",
  "commands": [
      {
          "title": "New",
          "action":"CreateDoc"
      },
      {
          "title": "Open",
          "action": "OpenDoc"
      },
      {
          "title": "Close",
          "action": "CloseDoc"
      }
   ]
}

and you use the eval() JavaScript function to  parse it.
<pre>var req = new XMLHttpRequest();
req.open("GET", "file.json", true);
req.onreadystatechange = myCode;   // the handler
req.send(null);</pre>
<p><strong>The JavaScript handler:</strong></p>
<pre>function myCode()
{
   if (req.readyState == 4)
   {
        var doc = eval('(' + req.responseText + ')');
   }
}
</pre>
</pre>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=e58d1985-08a8-4a14-a289-0d6958b92cf5" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxplus.net/2010/02/03/ajax-tip-use-json-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online booking system</title>
		<link>http://www.ajaxplus.net/2010/02/02/online-booking-system/</link>
		<comments>http://www.ajaxplus.net/2010/02/02/online-booking-system/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 14:35:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax Tools]]></category>
		<category><![CDATA[online booking system]]></category>

		<guid isPermaLink="false">http://www.ajaxplus.net/?p=14</guid>
		<description><![CDATA[  Hello all,
If you need an online booking system to your website, you can use S-Development ltd. They can quickly add it to your site according to your needs.
This is good solution for dental practices, hair dressers and anyone who needs appointment booking.
And it is not expensive either! 
 ]]></description>
			<content:encoded><![CDATA[<p> Hello all,</p>
<p>If you need an <a href="http://www.s-development.net/online-booking-system" target="_self">online booking system</a> to your website, you can use S-Development ltd. They can quickly add it to your site according to your needs.</p>
<p>This is good solution for dental practices, hair dressers and anyone who needs appointment booking.</p>
<p>And it is not expensive either! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxplus.net/2010/02/02/online-booking-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup your database</title>
		<link>http://www.ajaxplus.net/2009/11/24/backup-your-database/</link>
		<comments>http://www.ajaxplus.net/2009/11/24/backup-your-database/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 15:54:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax Tools]]></category>

		<guid isPermaLink="false">http://www.ajaxplus.net/2009/11/24/backup-your-database/</guid>
		<description><![CDATA[  Hi all,
No matter how good your script is if you don&#8217;t have backups it worth nothing.
I am using Ajax to develop very complicated databases to companies. Sometimes I am scared by the amount of data they store on the db and how important it is. If my clients losing their data then first they [...] ]]></description>
			<content:encoded><![CDATA[<p> Hi all,</p>
<p>No matter how good your script is if you don&#8217;t have backups it worth nothing.</p>
<p>I am using Ajax to develop very complicated databases to companies. Sometimes I am scared by the amount of data they store on the db and how important it is. If my clients losing their data then first they will kill me then they will kill themselves.</p>
<p>That&#8217;s why you need a backup! I would recommend using <a href="http://www.websitesbackup.com" title="Websites backup">Websites backup</a>. This will do the job for you&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxplus.net/2009/11/24/backup-your-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajax Problem with encoding on ie7</title>
		<link>http://www.ajaxplus.net/2008/12/29/ajax-problem-with-encoding-on-ie7/</link>
		<comments>http://www.ajaxplus.net/2008/12/29/ajax-problem-with-encoding-on-ie7/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 16:18:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax Tools]]></category>
		<category><![CDATA[ajax encoding]]></category>

		<guid isPermaLink="false">http://www.ajaxplus.net/2008/12/29/ajax-problem-with-encoding-on-ie7/</guid>
		<description><![CDATA[  Hi all,
I think I spent hours to find a solution to this problem:
On IE when you send a var to the php in non Latin chars (like Hebrew and Arabic), the php gets it like ???
today I found someone who found a solution! it is simple and works:
http://www.phpfreaks.com/forums/index.php?topic=211522.0
Hope it helps! 
 ]]></description>
			<content:encoded><![CDATA[<p> Hi all,</p>
<p>I think I spent hours to find a solution to this problem:</p>
<p>On IE when you send a var to the php in non Latin chars (like Hebrew and Arabic), the php gets it like ???</p>
<p>today I found someone who found a solution! it is simple and works:</p>
<p>http://www.phpfreaks.com/forums/index.php?topic=211522.0</p>
<p>Hope it helps! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxplus.net/2008/12/29/ajax-problem-with-encoding-on-ie7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to submit a form using post and Ajax?</title>
		<link>http://www.ajaxplus.net/2008/03/07/how-to-submit-a-form-using-post-and-ajax/</link>
		<comments>http://www.ajaxplus.net/2008/03/07/how-to-submit-a-form-using-post-and-ajax/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 09:30:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax Tools]]></category>

		<guid isPermaLink="false">http://www.ajaxplus.net/2008/03/07/how-to-submit-a-form-using-post-and-ajax/</guid>
		<description><![CDATA[  Hi all,
This is a very simple, powerful and useful Ajax code  that lets you submit a form using Ajax and &#8216;post&#8217; method.
lets start with the form.
The most important thing is to give an ID to the form and then call to a Javascript function on submit.  We will have something like:
&#60;form action=&#8221;add_client.php&#8221; method=&#8221;post&#8221; id=&#8221;add_client&#8221;  [...] ]]></description>
			<content:encoded><![CDATA[<p> Hi all,</p>
<p>This is a very simple, powerful and useful Ajax code  that lets you submit a form using Ajax and &#8216;post&#8217; method.</p>
<p>lets start with the form.</p>
<p>The most important thing is to give an ID to the form and then call to a Javascript function on submit.  We will have something like:</p>
<p>&lt;form action=&#8221;add_client.php&#8221; method=&#8221;post&#8221; id=&#8221;add_client&#8221;  name=&#8221;add_client&#8221; onsubmit=&#8221;post_form(&#8216;add_client&#8217;); return false;&#8221;&gt;</p>
<p>&lt;input type=&#8221;text&#8221; name=&#8221;client_name&#8221; id=&#8221;client_name&#8221;&gt;</p>
<p>&lt;input type=&#8221;submit&#8221; value=&#8221;Add&#8221;&gt;</p>
<p>&lt;/form&gt;</p>
<p>So when you submit this form the script calls the post_form function and send the form&#8217;s id (in this case add_client).</p>
<p>Now on the Javascript we will use the zxml library</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;zxml.js&#8221;&gt;&lt;/script&gt;</p>
<p>and we will create the function post_form:</p>
<p>function post_form(form_id){</p>
<p>var oForm = document.getElementById(form_id);<br />
var sBody = getRequestBody(oForm);<br />
var oXmlHttp = zXmlHttp.createRequest();<br />
oXmlHttp.open(&#8220;post&#8221;, oForm.action, true);<br />
oXmlHttp.setRequestHeader(&#8220;Content-Type&#8221;, &#8220;application/x-www-form-urlencoded&#8221;);<br />
oXmlHttp.onreadystatechange = function () {<br />
if (oXmlHttp.readyState == 4) {<br />
if (oXmlHttp.status == 200) {<br />
view(oXmlHttp.responseText,page_name,display_type,div_name,job_id,span_id);<br />
}<br />
else {<br />
view(&#8220;An error occurred: &#8221; + oXmlHttp.statusText);<br />
}<br />
}<br />
};<br />
oXmlHttp.send(sBody);<br />
}<br />
function getRequestBody(oForm) {<br />
var aParams = new Array();<br />
for (var i=0 ; i &lt; oForm.elements.length; i++) {<br />
var sParam = encodeURIComponent(oForm.elements[i].name);<br />
sParam += &#8220;=&#8221;;<br />
if(oForm.elements[i].checked){<br />
sParam += &#8220;1&#8243;;<br />
}<br />
else {<br />
sParam += encodeURIComponent(oForm.elements[i].value);<br />
}<br />
aParams.push(sParam);<br />
}<br />
//alert (aParams);<br />
return aParams.join(&#8220;&amp;&#8221;);<br />
}</p>
<p>}</p>
<p>post_form calls to getRequestBody that gets all the form&#8217;s elements and send it back. Then post_form will submit the form to the action location (add_client.php) in the php file you should create a script that connect to the db gets the new client name from the form and insert it. Then you can generates a confirmation message on the php file (something like: echo &#8220;Client has been added&#8221;;)</p>
<p>Now the post_form gets back the php message and we need to decide what to do with it. Lets create a div where the message will be displayed</p>
<p>&lt;div id=&#8221;messege&#8221;&gt;&lt;/dib&gt;</p>
<p>Now post_form calls to the function view and sends the php&#8217;s messege to it. So function view will looke like:</p>
<p>function view(sText){</p>
<p>var el = document.getElementById(&#8216;message&#8217;);<br />
el.innerHTML = sText;</p>
<p>}</p>
<p>that&#8217;s it&#8230; you submitted a form and got the results on the same page. Easy <img src='http://www.ajaxplus.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxplus.net/2008/03/07/how-to-submit-a-form-using-post-and-ajax/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Simple Ajax code</title>
		<link>http://www.ajaxplus.net/2008/02/23/simple-ajax-code/</link>
		<comments>http://www.ajaxplus.net/2008/02/23/simple-ajax-code/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 18:32:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax Tools]]></category>

		<guid isPermaLink="false">http://www.ajaxplus.net/2008/02/23/simple-ajax-code/</guid>
		<description><![CDATA[  Here is a sample code to use ajax:
Lets say you have a field that you want to update the db every time someone insert info there without refreshing the page or going to another page.
So the html will look like:
[code]
&#60;input type="text" name="field1" id="field1" onchange="update_field()"&#62;
[/code]
This is very basic input type.
Now to the javascript:
first we need [...] ]]></description>
			<content:encoded><![CDATA[<p> Here is a sample code to use ajax:</p>
<p>Lets say you have a field that you want to update the db every time someone insert info there without refreshing the page or going to another page.</p>
<p>So the html will look like:<br />
[code]</p>
<p>&lt;input type="text" name="field1" id="field1" onchange="update_field()"&gt;</p>
<p>[/code]</p>
<p>This is very basic input type.<br />
Now to the javascript:</p>
<p>first we need to call to the ajax libary:<br />
[code]&lt;script type="text/javascript" src="zxml.js"&gt;&lt;/script&gt;[/code]</p>
<p>now we will create the update_field() function:</p>
<p>[code]function update_field(){<br />
var field1 = document.getElementById("field1");<br />
var Str = "update.php?field=" + field1;<br />
var oXmlHttp = zXmlHttp.createRequest();<br />
oXmlHttp.open("get", Str , true);<br />
oXmlHttp.onreadystatechange = function () {</p>
<p>if (oXmlHttp.readyState == 4) {<br />
if (oXmlHttp.status == 200) {<br />
save_info(oXmlHttp.responseText);<br />
} else {<br />
save_info("An error occurred: " + oXmlHttp.statusText); //statusText is not always accurate<br />
}<br />
}<br />
oXmlHttp.send(null);</p>
<p>}[/code]</p>
<p>on this function we send the value of the field to a php file. On update.php we will update the the db with some php code:</p>
<p>[code]<br />
$sql = "update tbl_field set field=$field";<br />
[/code]</p>
<p>Now the php return a message we need to take it and dispaly it on a div. First we will create a div on the body section:</p>
<p>[code]&lt;div id="php_message"&gt;&lt;/div&gt;[/code]</p>
<p>then we will create a function save_info that we are calling it from update_field() after the php sent 400 code status (meaning everthing is ok)</p>
<p>[code]<br />
function save_info(sText) {<br />
var php_message = document.getElementById("php_message");<br />
php_message.innerHTML = sText;}<br />
[/code]</p>
<p>and that&#8217;s it! easy! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxplus.net/2008/02/23/simple-ajax-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great ajax library</title>
		<link>http://www.ajaxplus.net/2008/02/22/great-ajax-library/</link>
		<comments>http://www.ajaxplus.net/2008/02/22/great-ajax-library/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 16:55:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax Tools]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[zxml]]></category>

		<guid isPermaLink="false">http://www.ajaxplus.net/?p=4</guid>
		<description><![CDATA[  I really don&#8217;t remember where I found it (so I can&#8217;t give credit) but this is a great ajax library that can help you a lot to develop ajax applications.
zxml.js
Enjoy&#8230; 
 ]]></description>
			<content:encoded><![CDATA[<p> I really don&#8217;t remember where I found it (so I can&#8217;t give credit) but this is a great ajax library that can help you a lot to develop ajax applications.</p>
<p><a href="http://www.ajaxplus.net/wp-content/uploads/2008/02/zxml.js" title="zxml.js">zxml.js</a></p>
<p><a href="http://www.ajaxplus.net/wp-content/uploads/2008/02/zxml.js" title="zxml.js"></a>Enjoy&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxplus.net/2008/02/22/great-ajax-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajax blog</title>
		<link>http://www.ajaxplus.net/2008/02/22/hello-world/</link>
		<comments>http://www.ajaxplus.net/2008/02/22/hello-world/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 16:18:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax Tools]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.ajaxplus.net/?p=1</guid>
		<description><![CDATA[  Hi everyone,
The aim of this blog is to help you develop a better ajax applications. If you need general help or you have problems with Javascript or css this is the place to ask. I am sure you will learn to love ajax as much as I do&#8230;
Enjoy the blog! 
 ]]></description>
			<content:encoded><![CDATA[<p> Hi everyone,</p>
<p>The aim of this blog is to help you develop a better ajax applications. If you need general help or you have problems with Javascript or css this is the place to ask. I am sure you will learn to love ajax as much as I do&#8230;</p>
<p>Enjoy the blog! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxplus.net/2008/02/22/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
