<?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>Just is here--恰恰在这里 &#187; protoytpe</title>
	<atom:link href="http://ishere.cn/tag/protoytpe/feed" rel="self" type="application/rss+xml" />
	<link>http://ishere.cn</link>
	<description>Jena&#039;s blog</description>
	<lastBuildDate>Sat, 14 Apr 2012 07:27:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>DIV弹窗后禁止页面滚动,IE和FF通用,基于prototype</title>
		<link>http://ishere.cn/2010/06/17/div%e5%bc%b9%e7%aa%97%e5%90%8e%e7%a6%81%e6%ad%a2%e9%a1%b5%e9%9d%a2%e6%bb%9a%e5%8a%a8ie%e5%92%8cff%e9%80%9a%e7%94%a8%e5%9f%ba%e4%ba%8eprototype.html</link>
		<comments>http://ishere.cn/2010/06/17/div%e5%bc%b9%e7%aa%97%e5%90%8e%e7%a6%81%e6%ad%a2%e9%a1%b5%e9%9d%a2%e6%bb%9a%e5%8a%a8ie%e5%92%8cff%e9%80%9a%e7%94%a8%e5%9f%ba%e4%ba%8eprototype.html#comments</comments>
		<pubDate>Thu, 17 Jun 2010 02:36:52 +0000</pubDate>
		<dc:creator>jena</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[protoytpe]]></category>

		<guid isPermaLink="false">http://ishere.cn/?p=522</guid>
		<description><![CDATA[DIV弹出之前，禁止页面滚动： if(Prototype.Browser.IE){ $($$(&#8216;html&#8217;)[0]).setStyle({overflow : &#8216;hidden&#8217;}); }else{ $($$(&#8216;body&#8217;)[0]).setStyle({overflow : &#8216;hidden&#8217;}); } DIV关闭之后，恢复页面滚动： if(Prototype.Browser.IE){ $($$(&#8216;html&#8217;)[0]).setStyle({overflow : &#8216;auto&#8217;}); }else{ $($$(&#8216;body&#8217;)[0]).setStyle({overflow : &#8216;auto&#8217;}); }]]></description>
			<content:encoded><![CDATA[<p>DIV弹出之前，禁止页面滚动：<br />
if(Prototype.Browser.IE){<br />
$($$(&#8216;html&#8217;)[0]).setStyle({overflow : &#8216;hidden&#8217;});<br />
}else{<br />
$($$(&#8216;body&#8217;)[0]).setStyle({overflow : &#8216;hidden&#8217;});<br />
}</p>
<p>DIV关闭之后，恢复页面滚动：<br />
if(Prototype.Browser.IE){<br />
$($$(&#8216;html&#8217;)[0]).setStyle({overflow : &#8216;auto&#8217;});<br />
}else{<br />
$($$(&#8216;body&#8217;)[0]).setStyle({overflow : &#8216;auto&#8217;});<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://ishere.cn/2010/06/17/div%e5%bc%b9%e7%aa%97%e5%90%8e%e7%a6%81%e6%ad%a2%e9%a1%b5%e9%9d%a2%e6%bb%9a%e5%8a%a8ie%e5%92%8cff%e9%80%9a%e7%94%a8%e5%9f%ba%e4%ba%8eprototype.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajax and JSON</title>
		<link>http://ishere.cn/2008/07/11/ajax-and-json.html</link>
		<comments>http://ishere.cn/2008/07/11/ajax-and-json.html#comments</comments>
		<pubDate>Fri, 11 Jul 2008 14:20:32 +0000</pubDate>
		<dc:creator>jena</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[protoytpe]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.aobodo.com/?p=172</guid>
		<description><![CDATA[关于JSON，是很久以前就听说了，但是一直没有真正的去研究，去使用。 关于AJAX，也是很久以前就听说了，而且一直也在研究，在使用。 关于AJAX　and　JSON，是刚刚开始研究和使用。 JSON，JavaScript Object Notation, 我理解为Javascript 对象标记，可能不太准确，但是这样有助自己理解和使用。高人们都说JSON使用起来要比XML更灵活，更方便，是吗，带着这样的疑问，自己写了个小例子。 数据库里有４W条记录，通过ASP读取出来，再用JSON的ASP类生成JSON格式数据： json.asp: Server.ScriptTimeOut  = 500000 Response.Buffer = True Response.ContentType = “application/json” Dim Conn Set Conn=Server.CreateObject(“Adodb.connection”) Conn.Open “Provider = Microsoft.Jet.OLEDB.4.0; Data Source =D:TempIPCountry.mdb” QueryToJSON(Conn, “SELECT Top 1500 country, countrylong FROM ip2country”).Flush Response.ContentType = &#8230; <a href="http://ishere.cn/2008/07/11/ajax-and-json.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>关于JSON，是很久以前就听说了，但是一直没有真正的去研究，去使用。</p>
<p>关于AJAX，也是很久以前就听说了，而且一直也在研究，在使用。</p>
<p>关于AJAX　and　JSON，是刚刚开始研究和使用。</p>
<p>JSON，JavaScript Object Notation, 我理解为Javascript 对象标记，可能不太准确，但是这样有助自己理解和使用。高人们都说JSON使用起来要比XML更灵活，更方便，是吗，带着这样的疑问，自己写了个小例子。</p>
<p><span id="more-367"></span></p>
<p>数据库里有４W条记录，通过ASP读取出来，再用JSON的ASP类生成JSON格式数据：</p>
<p>json.asp:</p>
<blockquote><p>Server.ScriptTimeOut  = 500000<br />
Response.Buffer = True<br />
Response.ContentType = “application/json”</p>
<p>Dim Conn<br />
Set Conn=Server.CreateObject(“Adodb.connection”)<br />
Conn.Open “Provider = Microsoft.Jet.OLEDB.4.0; Data Source =D:TempIPCountry.mdb”</p>
<p>QueryToJSON(Conn, “SELECT Top 1500 country, countrylong FROM ip2country”).Flush</p>
</blockquote>
<p>Response.ContentType = “application/json”这句话指定了内容输出类型为JSON，这样，当AJAX获取以后，就可以直接作为对象来对待，进而直接使用，不用再eval了。</p>
<p>json.html</p>
<blockquote><p>&lt;div id=”outer”  style=” position:relative;line-height:22px; width:auto; padding:20px; height:300px; border:1px solid #006699; overflow:auto;”&gt;&lt;/div&gt;<br />
&lt;script&gt;<br />
getJson = function(){<br />
new Element.update(&#8216;outer&#8217;,'Init&#8230;&#8217;+ new Date().toJSON() + &#8216;&lt;br&gt;&#8217;);<br />
new Ajax.Request(&#8216;json.asp&#8217;,{<br />
onCreate:function(){new Insertion.Bottom(&#8216;outer&#8217;,'Create:&#8217;+ new Date().toJSON() + &#8216;&lt;br&gt;&#8217;);},<br />
onLoading:function(){new Insertion.Bottom(&#8216;outer&#8217;,'Loading:&#8217;+ new Date().toJSON() + &#8216;&lt;br&gt;&#8217;);},<br />
onLoaded:function(){new Insertion.Bottom(&#8216;outer&#8217;,'Loaded:&#8217;+ new Date().toJSON() + &#8216;&lt;br&gt;&#8217;);},<br />
onSuccess:function(trans){<br />
new Insertion.Bottom(&#8216;outer&#8217;,'Start Insert:&#8217;+ new Date().toJSON() + &#8216;&lt;br&gt;&#8217;);<br />
var json = trans.responseJSON;<br />
for(var i=0;i&lt;json.length;i++){<br />
new Insertion.Bottom(&#8216;outer&#8217;,'&lt;div style=”border-bottom:1px dashed #cccccc;”&gt;&lt;img src=”http://image.test.com/images/flags/&#8217;+json[i].country+&#8217;.png”&gt; &#8216;+ json[i].countrylong +&#8217;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&#8217;);<br />
$(&#8216;outer&#8217;).scrollTop = $(&#8216;outer&#8217;).scrollHeight;<br />
};<br />
new Insertion.Bottom(&#8216;outer&#8217;,'End Insert:&#8217;+ new Date().toJSON() + &#8216;&lt;br&gt;&#8217;);<br />
$(&#8216;outer&#8217;).scrollTop = $(&#8216;outer&#8217;).scrollHeight;<br />
}<br />
});<br />
}<br />
&lt;/script&gt;<br />
&lt;button onclick=”getJson()”&gt;Get Json&lt;/button&gt;</p>
</blockquote>
<p>JS的类库我使用的是prototype的，里面已经封装了对JSON对象的处理方法，所以，只用responseJSON这一方法就可以获得返回来的JSON对象。接下来对获取的数据进行解析，这里的解析也没有用JSON官方的类包，只是用JS本身的规范对已确定的JSON数据格式进行处理，把内容指定到该指定的地方，就可以了，很简单。</p>
<p>在执行效率上，比使用XML确实快了一些，因为对数据的处理不再需要DOM对象，而是使用JS本身规范就可以了，这样一来就省了一部分时间，整体感觉上还是不错。</p>
<p>只是一个简单的测试，对JSON的理解可能也太过肤浅，以后随着项目的需要，肯定还会接触，还会更深的去理解和使用它，另外，在网上看到有评论说JSON可能会取代XML，让AJAX变成AJAJ，呵呵，或许会有这一天。</p>
]]></content:encoded>
			<wfw:commentRss>http://ishere.cn/2008/07/11/ajax-and-json.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决Prototype.js传递中文参数的问题！</title>
		<link>http://ishere.cn/2007/06/28/chinese-prototypejs-transmission-parameters.html</link>
		<comments>http://ishere.cn/2007/06/28/chinese-prototypejs-transmission-parameters.html#comments</comments>
		<pubDate>Thu, 28 Jun 2007 02:01:41 +0000</pubDate>
		<dc:creator>jena</dc:creator>
				<category><![CDATA[keyboard's joy]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[protoytpe]]></category>

		<guid isPermaLink="false">http://news.aobodo.com/?p=138</guid>
		<description><![CDATA[2007/06/29 更新： 增加随机码，确保每次都有效读取。 ＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝ 这段时间一直对javascript挺感兴趣的。 前些日子开始用prototype的一些脚本，说起来惭愧，早就存在而且出名的东东，自己竟然不知道，唉。 用prototype.js的Ajax.Request实现异步传递真不错，可以把整个表单转换成string来传递，也可以单独获取某一个文本域的值，可是有一个缺点就是不支持中文参数传递(可能是我没发现)，毕竟是老外的写的东东。经过一番琢磨，我发现是在内部脚本中对参数编码的问题，老外不管什么参数都用encodeURIComponent()函数进行编码，而中文则适用于escape()函数。经过测试，问题解决了，可以实现传递中文参数了。在实际应用中，可以指定encoding，若：encoding:”gb2312&#8243;,则自动转换为escape()函数进行编码；若不指定encoding则使用默认函数encodeURIComponent()。 我把修改过了prototype.js放上来，需要的朋友下载就是了，版本是1.5.0 Click Here To Download]]></description>
			<content:encoded><![CDATA[<p>2007/06/29 更新：<br />
增加随机码，确保每次都有效读取。</p>
<p>＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝</p>
<p>这段时间一直对javascript挺感兴趣的。<br />
前些日子开始用prototype的一些脚本，说起来惭愧，早就存在而且出名的东东，自己竟然不知道，唉。<br />
用prototype.js的Ajax.Request实现异步传递真不错，可以把整个表单转换成string来传递，也可以单独获取某一个文本域的值，可是有一个缺点就是不支持中文参数传递(可能是我没发现)，毕竟是老外的写的东东。经过一番琢磨，我发现是在内部脚本中对参数编码的问题，老外不管什么参数都用encodeURIComponent()函数进行编码，而中文则适用于escape()函数。经过测试，问题解决了，可以实现传递中文参数了。在实际应用中，可以指定encoding，若：encoding:”gb2312&#8243;,则自动转换为escape()函数进行编码；若不指定encoding则使用默认函数encodeURIComponent()。<br />
<img src="http://www.aobodo.com/FCKeditor/editor/images/smiley/msn/teeth_smile.gif" alt="" /></p>
<p>我把修改过了prototype.js放上来，需要的朋友下载就是了，版本是1.5.0</p>
<p><a title="http://www.ishere.cn/wp-content/uploads/200706/28_101735_prototype.js.rar" href="http://www.ishere.cn/wp-content/uploads/200706/28_101735_prototype.js.rar" target="_blank"><img src="http://www.aobodo.com/userfiles/image/file.gif" border="0" alt="" width="16" height="16" /> Click Here To Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ishere.cn/2007/06/28/chinese-prototypejs-transmission-parameters.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

