<?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>Davy&#039;s Blog &#187; Javascript</title>
	<atom:link href="http://blog.hao909.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hao909.com</link>
	<description>Nothing is impossible­ for a willing heart.</description>
	<lastBuildDate>Tue, 31 Jan 2012 16:30:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ExtJS4 Viewport Example</title>
		<link>http://blog.hao909.com/extjs4-viewport-example/</link>
		<comments>http://blog.hao909.com/extjs4-viewport-example/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 00:48:24 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[viewport]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=735</guid>
		<description><![CDATA[This is an simple example to show you how to create a viewport in ExtJs4.
The Viewport renders itself to the document body, and automatically sizes itself to the size of the browser viewport and manages window resizing. There may only be one Viewport created in a page.
The Viewport does not provide scrolling, so child Panels [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/extjs4-viewport-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ExtJS4 : read posting JSON data in PHP</title>
		<link>http://blog.hao909.com/extjs4-read-posting-json-data-in-php/</link>
		<comments>http://blog.hao909.com/extjs4-read-posting-json-data-in-php/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 16:50:30 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=722</guid>
		<description><![CDATA[I am working on a Ext-JS web application which needs to send data to the PHP server side to store. It took me a while to find out how to decodes the receiving JSON string in PHP.
Ext-JS 
Assume you have a model and calling save to send a ajax request. 

Ext.define('User', {
    [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/extjs4-read-posting-json-data-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ExtJS4: Add Custom Right Click Menu in MVC</title>
		<link>http://blog.hao909.com/extjs4-add-custom-right-click-menu-in-mvc/</link>
		<comments>http://blog.hao909.com/extjs4-add-custom-right-click-menu-in-mvc/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 00:39:59 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=715</guid>
		<description><![CDATA[The way to create a custom menu in mouse right click event function in ExtJS 4 is little different with pre-version. It seems in Ext 4.0.2 they changed event name and arguments order. 
First, let&#8217;s see how we create the menu in Ext 3. I get this example from aditia rahman:

var menu1 = new Ext.menu.Menu({
 [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/extjs4-add-custom-right-click-menu-in-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Global variables and arrays in Extjs 4</title>
		<link>http://blog.hao909.com/using-global-variables-and-arrays-in-extjs-4/</link>
		<comments>http://blog.hao909.com/using-global-variables-and-arrays-in-extjs-4/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 15:32:58 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=708</guid>
		<description><![CDATA[This example will show you how to declare a global var and arrays in Extjs MVC application.
You know where to find this code : 

&#60;script type=&#34;text/javascript&#34;&#62;
        Ext.BLANK_IMAGE_URL = '/Content/images/default/s.gif';
&#60;/script&#62;

Global application variable : 

&#60;script type=&#34;text/javascript&#34;&#62;
        Ext.BLANK_IMAGE_URL = '/Content/images/default/s.gif';
     [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/using-global-variables-and-arrays-in-extjs-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ExtJS4学习笔记 PHP代码</title>
		<link>http://blog.hao909.com/extjs4%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0-php%e4%bb%a3%e7%a0%81/</link>
		<comments>http://blog.hao909.com/extjs4%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0-php%e4%bb%a3%e7%a0%81/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 20:30:42 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[extjs]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=700</guid>
		<description><![CDATA[笔者在ExtJS4学习笔记原文中使用的服务器端代码是ASP的，我把它转成了PHP的。方便PHP的爱好者使用。代码如下： 

&#60;?
//header('Cache-Control: no-cache, must-revalidate');
//header('Content-type: application/json');

//返回JSON数据,自定义一些测试数据。。
//这里的参数与EXT3.x相同，区别在于排序字段和排序方式使用了新的属性。
//由于这里是测试数据，接收的参数只用到了start,limit。sorts和dir在实际操作过程中，将之加入SQL的ORDER BY里即可。
$start = empty($_REQUEST[&#34;start&#34;])?'':$_REQUEST[&#34;start&#34;];
$limit = empty($_REQUEST[&#34;limit&#34;])?'':$_REQUEST[&#34;limit&#34;]; 

if ( $start == &#34;&#34; )
	$start = 0;

if ( $limit == &#34;&#34; )
	$limit = 50; 

$sorts = empty($_REQUEST[&#34;sort&#34;])?'':$_REQUEST[&#34;sort&#34;];
$dir = empty($_REQUEST[&#34;dir&#34;])?'':$_REQUEST[&#34;dir&#34;]; 

if ( $sorts != '' )
	$sorts = str_replace(&#34;'&#34;, &#34;&#34;, trim($sorts)); 

if ( $dir != '' )
	$dir = str_replace(&#34;'&#34;, &#34;&#34;, trim($dir)); 

$counts = 300;
//注意，这里的counts相当于Rs.RecordCount,也就是记录总数。

$Ls = $start+$limit; [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/extjs4%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0-php%e4%bb%a3%e7%a0%81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extjs- Ext.extend函数的使用</title>
		<link>http://blog.hao909.com/extjs-ext-extend%e5%87%bd%e6%95%b0%e7%9a%84%e4%bd%bf%e7%94%a8/</link>
		<comments>http://blog.hao909.com/extjs-ext-extend%e5%87%bd%e6%95%b0%e7%9a%84%e4%bd%bf%e7%94%a8/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 01:36:06 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[extend]]></category>
		<category><![CDATA[extjs]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=695</guid>
		<description><![CDATA[Ext.extend在Extjs 中扮演着重大角色，是Extjs中几个重要函数之一。要想深入了解EXTJS，这个函数非掌握不可,网上有很多关于这个函数的源码分析和介绍方面的文章,这里我只总结关于这个函数的使用的下几种情况,不详细分析这个函数的源码。
Example one:

function Base(config) {
  this.name=config.name;
  this.age=config.age;
  this.sex=config.sex;
}

function base(config) {
 this.identity=config.identity;
 this.msg=config.msg;
 this.phone=config.phone;

 base.superclass.constructor.call(this,config);
}

Ext.extend(base,Base,{
   showMsg:function(){
     window.alert(this.name+' '+this.age+' '+this.sex+' '+this.identity+' '+this.msg+' '+this.phone);
   }
});

 var mybase=new base({
       name:’’,
       age:’’,
      [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/extjs-ext-extend%e5%87%bd%e6%95%b0%e7%9a%84%e4%bd%bf%e7%94%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorting a two dimensional array in javascript</title>
		<link>http://blog.hao909.com/sorting-a-two-dimensional-array-in-javascript/</link>
		<comments>http://blog.hao909.com/sorting-a-two-dimensional-array-in-javascript/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 16:24:52 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[dimensional]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=687</guid>
		<description><![CDATA[Sorting arrays in JavaScript is done via the method array.sort().
Passing in a function reference into array.sort()
As touched on already, array.sort() accepts an optional parameter in the form of a function reference (lets call it sortfunction). The format of this function looks like this:

array.sort(sortfunction)

function sortfunction(a, b){
   //Compare &#34;a&#34; and &#34;b&#34; in some fashion, and [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/sorting-a-two-dimensional-array-in-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pass variable to javascript use javascript</title>
		<link>http://blog.hao909.com/pass-variable-to-js-use-js/</link>
		<comments>http://blog.hao909.com/pass-variable-to-js-use-js/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 20:46:04 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[time stamp]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=580</guid>
		<description><![CDATA[Client wants add following tracking code on website:

&#60;script type=&#34;text/javascript&#34; src=&#34;http://www.demo.com/show.php?mpt=[CACHEBUSTER]&#38;mpvc=&#34;&#62;
&#60;/script&#62;
&#60;noscript&#62;
  &#60;a href=&#34;http://www.demo.com/show.php?mpt=[CACHEBUSTER]&#34;&#62;
    &#60;img src=&#34;http://www.demo.com/show.php?mpt=[CACHEBUSTER]&#34; alt=&#34;Click Here&#34; border=&#34;0&#34;&#62;
&#60;/a&#62;
&#60;/noscript&#62;

To ensure accurate tracking, they want [CACHEBUSTER] can be replaced by a Time Stamp when page reload. 
This is the way we use: 

&#60;script type=&#34;text/javascript&#34;&#62;
var currentTime = new Date();
var time_stamp = currentTime.getTime(); 

document.write('&#60;scr' + 'ipt [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/pass-variable-to-js-use-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use the W3C Geolocation API</title>
		<link>http://blog.hao909.com/how-to-use-the-w3c-geolocation-api/</link>
		<comments>http://blog.hao909.com/how-to-use-the-w3c-geolocation-api/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 20:24:50 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Mobile web]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=510</guid>
		<description><![CDATA[Introduction
Imagine visiting a city for the first time. You&#8217;re hungry, but don&#8217;t  know where the nearest restaurants are and which of them are any good.  Wouldn&#8217;t it be nice if some app could detect your location and provide  you with a list of restaurants closest to you, along with reviews and  [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/how-to-use-the-w3c-geolocation-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript trim function</title>
		<link>http://blog.hao909.com/javascript-trim-function/</link>
		<comments>http://blog.hao909.com/javascript-trim-function/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 18:56:16 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[javascript code]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[trim]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=488</guid>
		<description><![CDATA[In programming, trim is a string manipulation function or algorithm. The most popular variants of the trim function strip only the beginning or end of the string. Typically named ltrim and rtrim respectively.
This Javascript code trim implementation removes all leading and trailing occurrences of a set of characters specified. If no characters are specified it [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/javascript-trim-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

