<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[kakapo's nest]]></title> 
<link>http://www.kakapo.cn/blog/index.php</link> 
<description><![CDATA[My Technical Knowledge Management System]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[kakapo's nest]]></copyright>
<item>
<link>http://www.kakapo.cn/blog/read.php?122</link>
<title><![CDATA[收集一个叫prototype-window的作品]]></title> 
<author>kakapo &lt;kakapowu@gmail.com&gt;</author>
<category><![CDATA[AJAX]]></category>
<pubDate>Tue, 11 Sep 2007 03:22:40 +0000</pubDate> 
<guid>http://www.kakapo.cn/blog/read.php?122</guid> 
<description>
<![CDATA[ 
	非常酷的窗口效果，基于prototype.js开发出来的ajax经典作品。说不定会应用在以后的项目中。<br/><br/>网址：http://prototype-window.xilinus.com/themes.html<br/>Tags - <a href="http://www.kakapo.cn/blog/tag.php?tag=ajax" rel="tag">ajax</a>
]]>
</description>
</item><item>
<link>http://www.kakapo.cn/blog/read.php?79</link>
<title><![CDATA[各式各样的ajax技术]]></title> 
<author>kakapo &lt;kakapowu@gmail.com&gt;</author>
<category><![CDATA[AJAX]]></category>
<pubDate>Fri, 02 Mar 2007 09:16:36 +0000</pubDate> 
<guid>http://www.kakapo.cn/blog/read.php?79</guid> 
<description>
<![CDATA[ 
	 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 推荐一个国外的网站，收集了很多ajax技术。http://www.miniajax.com/
]]>
</description>
</item><item>
<link>http://www.kakapo.cn/blog/read.php?35</link>
<title><![CDATA[[转载]AJAX，但不用XmlHttpRequest Object！]]></title> 
<author>kakapo &lt;kakapowu@gmail.com&gt;</author>
<category><![CDATA[AJAX]]></category>
<pubDate>Tue, 07 Nov 2006 05:23:07 +0000</pubDate> 
<guid>http://www.kakapo.cn/blog/read.php?35</guid> 
<description>
<![CDATA[ 
	 &nbsp; &nbsp; 原理：通过在dom创建script tag，引入外部php文件，php文件生成javascript内容。<br/> &nbsp; 代码<br/>1.page1.php<br/><div class="code"><br/>&lt;?php<br/><br/>$html = &#039;&lt;b&gt;This content came from our Ajax Engine&lt;/b&gt;&#039;;<br/><br/>?&gt;<br/><br/>div = document.getElementById(&#039;contentdiv&#039;);<br/>div.innerHTML = &#039;&lt;?php echo $html; ?&gt;&#039;;<br/><br/></div><br/><br/>2.engine.js<br/><div class="code"><br/>// Get base url<br/>url = document.location.href;<br/>xend = url.lastIndexOf(&quot;/&quot;) + 1;<br/>var base_url = url.substring(0, xend);<br/><br/>function ajax_do (url) &#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp;// Does URL begin with http?<br/> &nbsp; &nbsp; &nbsp; &nbsp;if (url.substring(0, 4) != &#039;http&#039;) &#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;url = base_url + url;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&#125;<br/><br/> &nbsp; &nbsp; &nbsp; &nbsp;// Create new JS element<br/> &nbsp; &nbsp; &nbsp; &nbsp;var jsel = document.createElement(&#039;SCRIPT&#039;);<br/> &nbsp; &nbsp; &nbsp; &nbsp;jsel.type = &#039;text/javascript&#039;;<br/> &nbsp; &nbsp; &nbsp; &nbsp;jsel.src = url;<br/><br/> &nbsp; &nbsp; &nbsp; &nbsp;// Append JS element (therefore executing the &#039;AJAX&#039; call)<br/> &nbsp; &nbsp; &nbsp; &nbsp;document.body.appendChild (jsel);<br/>&#125;<br/><br/><br/></div><br/><br/>3.index.htm<br/><div class="code"><br/>&lt;html&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&lt;head&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;title&gt;Demo 1 - The Basic&#039;s&lt;/title&gt;<br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;script type=&quot;text/javascript&quot; src=&quot;engine.js&quot;&gt;&lt;/script&gt; &nbsp; &nbsp; &nbsp; &nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&lt;/head&gt;<br/><br/> &nbsp; &nbsp; &nbsp; &nbsp;&lt;body&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div id=&quot;contentdiv&quot;&gt;<br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/div&gt;<br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;input type=&quot;button&quot; onclick=&quot;ajax_do (&#039;page1.php&#039;);&quot; value=&quot;Get content&quot; /&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&lt;/body&gt;<br/>&lt;/html&gt;<br/><br/><br/><br/></div><br/><br/>最后注意：Ie浏览器的安全级别要 小于High<br/><br/>Tags - <a href="http://www.kakapo.cn/blog/tag.php?tag=xmlhttprequest" rel="tag">xmlhttprequest</a>
]]>
</description>
</item><item>
<link>http://www.kakapo.cn/blog/read.php?10</link>
<title><![CDATA[HTML_AJAX 使用]]></title> 
<author>kakapo &lt;kakapowu@gmail.com&gt;</author>
<category><![CDATA[AJAX]]></category>
<pubDate>Thu, 12 Oct 2006 06:22:04 +0000</pubDate> 
<guid>http://www.kakapo.cn/blog/read.php?10</guid> 
<description>
<![CDATA[ 
	PEAR 库新类 html_ajax 下载地址http://pear.php.net/package/HTML_AJAX<br/><br/>手册地址: http://www.azphp.org/files/HTML_AJAX.html<br/><br/>使用起来不是很简单.特别是将php类注册成js,成为ajax的扩展.<br/><br/>使用步骤:<br/><br/>1.写PHP类,由<script type="text/javascript" src="server2.php?stub=all"></script>调用.<br/><br/>server2.php 如下<br/><br/><?php<br/>require_once 'HTML/AJAX/Server.php';<br/>//php类<br/>class example &#123;<br/> &nbsp; &nbsp;function rot13($input) &#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp;return str_rot13($input);<br/> &nbsp; &nbsp;&#125;<br/><br/> &nbsp; &nbsp;function upperCase($input) &#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp;return strToUpper($input);<br/> &nbsp; &nbsp;&#125;<br/>&#125;<br/><br/>$server = new HTML_AJAX_Server();<br/><br/>// upperCase will export as uppercase in php4 and upperCase in php5<br/>$server->registerClass(new example());<br/><br/>// works in both php4 and 5 plus doing class name aliasing<br/>$server->registerClass(new example(),'example2',array('rot13','upperCase'));<br/><br/>$server->handleRequest();<br/>?><br/><br/>2.通过javascript 引用返回.<br/><br/><script type="text/javascript"><br/>var callback = &#123;<br/>rot13: function(result) &#123;<br/>document.getElementById('target').innerHTML = result;<br/>&#125;, <br/>upperCase: function(result) &#123;<br/>document.getElementById('target').innerHTML = result;<br/>&#125; <br/>&#125;<br/><br/>var remoteExample = new example2(callback); // our php5/4 compat version<br/><br/></script><br/><br/>3.在页面上由触发机制应用js<br/><br/>例如:<a href="#" onclick="remoteExample.rot13(document.getElementById('input').value)">rot13 input</a><br/><br/><a href="#" onclick="remoteExample.upperCase(document.getElementById('input').value)">upperCase input</a><br/><br/>
]]>
</description>
</item>
</channel>
</rss>