<?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>Joseph Scott &#187; javascript</title>
	<atom:link href="http://josephscott.org/archives/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://josephscott.org</link>
	<description></description>
	<lastBuildDate>Thu, 29 Jul 2010 16:56:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
	<atom:link rel='hub' href='http://josephscott.org/?pushpress=hub'/>
<cloud domain='josephscott.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>XHR / AJAX Performance &#8211; GET or POST?</title>
		<link>http://josephscott.org/archives/2010/07/xhr-ajax-performance-get-or-post/</link>
		<comments>http://josephscott.org/archives/2010/07/xhr-ajax-performance-get-or-post/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 15:18:45 +0000</pubDate>
		<dc:creator>Joseph Scott</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[tcp/ip]]></category>
		<category><![CDATA[xhr]]></category>

		<guid isPermaLink="false">http://josephscott.org/?p=2519</guid>
		<description><![CDATA[During the summer of 2009 I posted about XMLHttpRequest (XHR) using multiple packets for HTTP POST, but HTTP GET requests only used one (in most cases). This led to several people recommending HTTP GET requests for AJAX when possible, to maximize performance. Fortunately someone (Load Impact) took actual measurements to see what this looked like [...]


Related posts:<ol><li><a href='http://josephscott.org/archives/2009/08/xmlhttprequest-xhr-uses-multiple-packets-for-http-post/' rel='bookmark' title='Permanent Link: XMLHttpRequest (XHR) Uses Multiple Packets for HTTP POST?'>XMLHttpRequest (XHR) Uses Multiple Packets for HTTP POST?</a></li>
<li><a href='http://josephscott.org/archives/2010/02/recommended-reading-steve-souders-high-performance-web-sites/' rel='bookmark' title='Permanent Link: Recommended Reading: Steve Souders, High Performance Web Sites'>Recommended Reading: Steve Souders, High Performance Web Sites</a></li>
<li><a href='http://josephscott.org/archives/2010/01/php-count-performance/' rel='bookmark' title='Permanent Link: PHP Count Performance'>PHP Count Performance</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>During the summer of 2009 I posted about <a href="http://josephscott.org/archives/2009/08/xmlhttprequest-xhr-uses-multiple-packets-for-http-post/">XMLHttpRequest (XHR) using multiple packets for HTTP POST</a>, but HTTP GET requests only used one (in most cases).  This led to several people recommending HTTP GET requests for AJAX when possible, to maximize performance.</p>
<p>Fortunately someone (<a href="http://loadimpact.com/">Load Impact</a>) took actual measurements to see what this looked like in the real world &#8211; <a href="http://loadimpact.com/blog/ajax-get-or-post-which-is-best">AJAX GET or POST &#8211; which is best?</a>.  For details check out their <a href="http://loadimpact.com/info/Analysis_of_browser_specific_characteristics.pdf">analysis report (PDF)</a> (warning, contains gory geek details).  The short version, what they observed is that not only was HTTP POST (multiple packets) not slower, it was faster.  This is definitely contrary to the basic mental model of how this should work.  </p>
<p>If you are into front end performance and or TCP/IP go check it out, it would be great get solid explanation of why they are seeing these results.  On the flip side, if there is a flaw in the testing it would be good to identify that and come up with a new test.</p>


<p>Related posts:<ol><li><a href='http://josephscott.org/archives/2009/08/xmlhttprequest-xhr-uses-multiple-packets-for-http-post/' rel='bookmark' title='Permanent Link: XMLHttpRequest (XHR) Uses Multiple Packets for HTTP POST?'>XMLHttpRequest (XHR) Uses Multiple Packets for HTTP POST?</a></li>
<li><a href='http://josephscott.org/archives/2010/02/recommended-reading-steve-souders-high-performance-web-sites/' rel='bookmark' title='Permanent Link: Recommended Reading: Steve Souders, High Performance Web Sites'>Recommended Reading: Steve Souders, High Performance Web Sites</a></li>
<li><a href='http://josephscott.org/archives/2010/01/php-count-performance/' rel='bookmark' title='Permanent Link: PHP Count Performance'>PHP Count Performance</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://josephscott.org/archives/2010/07/xhr-ajax-performance-get-or-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Showing Your Last Tweet With Javascript</title>
		<link>http://josephscott.org/archives/2009/09/showing-your-last-tweet-with-javascript/</link>
		<comments>http://josephscott.org/archives/2009/09/showing-your-last-tweet-with-javascript/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 04:56:43 +0000</pubDate>
		<dc:creator>Joseph Scott</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[kynetx]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://josephscott.org/?p=1446</guid>
		<description><![CDATA[Phil Windley wrote about using Kynetx (his new startup) to show your last tweet on a site. My question was: why would this be better than using plain Javascript to do the same thing? Phil then wrote a follow up post to answer this question: Why Use the Kynetx Rule Language Instead of Javascript?. I [...]


Related posts:<ol><li><a href='http://josephscott.org/archives/2010/01/css-border-radius-percentages-and-elliptical-borders/' rel='bookmark' title='Permanent Link: CSS Border Radius Percentages and Elliptical Borders'>CSS Border Radius Percentages and Elliptical Borders</a></li>
<li><a href='http://josephscott.org/archives/2009/08/detecting-client-side-time-zone-offset-via-javascript/' rel='bookmark' title='Permanent Link: Detecting Client Side Time Zone Offset Via Javascript'>Detecting Client Side Time Zone Offset Via Javascript</a></li>
<li><a href='http://josephscott.org/code/javascript/' rel='bookmark' title='Permanent Link: Javascript'>Javascript</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.windley.com/">Phil Windley</a> wrote about using <a href="http://www.kynetx.com/">Kynetx</a> (his new startup) to <a href="http://www.windley.com/archives/2009/08/my_last_tweetpowered_by_kynetx.shtml">show your last tweet</a> on a site.  My question was: <a href="http://www.windley.com/archives/2009/08/my_last_tweetpowered_by_kynetx.shtml#comment-15249767">why would this be better than using plain Javascript</a> to do the same thing?  Phil then wrote a follow up post to answer this question: <a href="http://www.windley.com/archives/2009/08/why_use_the_kynetx_rule_language_instead_of_javascript.shtml">Why Use the Kynetx Rule Language Instead of Javascript?</a>.</p>
<p>I wasn&#8217;t convinced by the list in his response, but it did make me wonder what exactly it would take to do this in plain Javascript.  Using Phil&#8217;s layout as a model here is what I came up with (I added extra spaces to make it more readable):</p>
<pre class="brush: xml;">
&lt;div id=&quot;last_tweet&quot;&gt;Loading last tweet ...&lt;/div&gt;

&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&gt;
&lt;/script&gt;

&lt;script&gt;
function twitter_callback_function( tweet ) {
    var name = tweet[0].user.name.split(' ', 1);
    $('#last_tweet').html(
        '&lt;div class=&quot;me&quot;&gt;' +
        '&lt;a href=&quot;http://twitter.com/' +
        tweet[0].user.screen_name + '&quot;&gt;' +
        '&lt;img src=&quot;' + tweet[0].user.profile_image_url +
        '&quot; align=&quot;left&quot; width=&quot;40&quot; border=&quot;0&quot;/&gt; ' +
         name[0] + ' on Twitter&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;msg&quot;&gt;' +
        tweet[0].text + '&lt;div class=&quot;powered&quot;&gt;Powered by' +
        ' random bits of Javascript&lt;/div&gt;&lt;/div&gt;'
    );
    $('#last_tweet').addClass('last_tweet_box');
}
&lt;/script&gt;

&lt;script src=&quot;http://twitter.com/statuses/user_timeline/josephscott.json?callback=twitter_callback_function&amp;count=1&quot;&gt;&lt;/script&gt;
</pre>
<p>There are 4 parts to this.  The DIV that will hold the last tweet display, a copy of jQuery, a Javascript function to build the last tweet display and the JSON encoded (with callback function and tweet count specified).  jQuery wasn&#8217;t required, I included make things easier on myself.</p>
<p>With a little extra CSS we can style it to look very much like Phil&#8217;s:</p>
<pre class="brush: css;">
.last_tweet_box {
    background-color: rgb(51, 153, 255);
    display: block;
    font-size: 12px;
    padding: 5px;
    width: 165px;

    border-radius: 10px;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
}
.last_tweet_box .me {
    background-color: #fff;
    height: 45px;
    padding: 5px;

    border-radius: 10px;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
}
.last_tweet_box .me a {
    color: #444;
    font-size: 12px;
}
.last_tweet_box .me a img {
    border: none;
}
.last_tweet_box .msg {
    background-color: rgb(0, 51, 153);
    color: #fff;
    margin-top: 3px;
    padding: 5px;

    border-radius: 10px;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
}
.last_tweet_box .powered {
    color: rgb(170, 170, 170);
    font-size: 11px;
    padding-top: 5px;
    text-align: right;
}
.last_tweet_box .powered a {
    color: #ccc;
}
.last_tweet_box .powered a img {
    border: none;
}
</pre>
<p>The result is pretty close visually to what Phil had done.</p>
<p><img alt="" src="http://farm4.static.flickr.com/3530/3886455014_3c9d6d3854_o.jpg" title="Last Tweet" class="alignnone" width="197" height="158" /></p>
<p>I&#8217;ve talked with Phil about Kynetx and I&#8217;ll be watching to see how things develop.  There are some interesting possibilities in the area they are working in.  But this example of showing your last tweet doesn&#8217;t do a good job of showing off their strengths.</p>


<p>Related posts:<ol><li><a href='http://josephscott.org/archives/2010/01/css-border-radius-percentages-and-elliptical-borders/' rel='bookmark' title='Permanent Link: CSS Border Radius Percentages and Elliptical Borders'>CSS Border Radius Percentages and Elliptical Borders</a></li>
<li><a href='http://josephscott.org/archives/2009/08/detecting-client-side-time-zone-offset-via-javascript/' rel='bookmark' title='Permanent Link: Detecting Client Side Time Zone Offset Via Javascript'>Detecting Client Side Time Zone Offset Via Javascript</a></li>
<li><a href='http://josephscott.org/code/javascript/' rel='bookmark' title='Permanent Link: Javascript'>Javascript</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://josephscott.org/archives/2009/09/showing-your-last-tweet-with-javascript/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>XMLHttpRequest (XHR) Uses Multiple Packets for HTTP POST?</title>
		<link>http://josephscott.org/archives/2009/08/xmlhttprequest-xhr-uses-multiple-packets-for-http-post/</link>
		<comments>http://josephscott.org/archives/2009/08/xmlhttprequest-xhr-uses-multiple-packets-for-http-post/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 15:53:54 +0000</pubDate>
		<dc:creator>Joseph Scott</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[xhr]]></category>

		<guid isPermaLink="false">http://josephscott.org/?p=1411</guid>
		<description><![CDATA[A recent Think Vitamin article, The Definitive Guide to GET vs POST, mentioned something that I hadn&#8217;t seen before about XMLHttpRequest (XHR). Their Rule #4 states: When using XMLHttpRequest, browsers implement POST as a two-step process (sending the headers first and then the data). This means that GET requests are more responsive – something you [...]


Related posts:<ol><li><a href='http://josephscott.org/archives/2010/07/xhr-ajax-performance-get-or-post/' rel='bookmark' title='Permanent Link: XHR / AJAX Performance &#8211; GET or POST?'>XHR / AJAX Performance &#8211; GET or POST?</a></li>
<li><a href='http://josephscott.org/archives/2009/11/browser-stats-and-five-years-of-firefox/' rel='bookmark' title='Permanent Link: Browser Stats and Five Years of Firefox'>Browser Stats and Five Years of Firefox</a></li>
<li><a href='http://josephscott.org/archives/2010/02/recommended-reading-steve-souders-high-performance-web-sites/' rel='bookmark' title='Permanent Link: Recommended Reading: Steve Souders, High Performance Web Sites'>Recommended Reading: Steve Souders, High Performance Web Sites</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A recent Think Vitamin article, <a href="http://carsonified.com/blog/dev/the-definitive-guide-to-get-vs-post/">The Definitive Guide to GET vs POST</a>, mentioned something that I hadn&#8217;t seen before about XMLHttpRequest (XHR).  Their Rule #4 states:</p>
<blockquote><p>
When using XMLHttpRequest, browsers implement POST as a two-step process (sending the headers first and then the data). This means that GET requests are more responsive – something you need in AJAX environments.
</p></blockquote>
<p>The claim is that even the smallest XHR will be sent using two packets if the request is done over HTTP POST instead of HTTP GET.  I don&#8217;t remember ever having heard this claim before.</p>
<p>Let me first say that performance issues for POST vs. GET probably shouldn&#8217;t be your top factor for deciding which one to use.  Make sure that you understand the implications of each and pick the right method for your request.  For most people I suspect the biggest factor will involve caching, not performance.  I was going to leave a comment on the article about this, but <a href="http://carsonified.com/blog/dev/the-definitive-guide-to-get-vs-post/#comment-13698">Simon beat me to it</a>.</p>
<p>I wasn&#8217;t the only one who wanted to find out more about XHR POST using multiple packets.  Fortunately someone else already <a href="http://carsonified.com/blog/dev/the-definitive-guide-to-get-vs-post/#comment-13556">asked that question</a> and the author <a href="http://carsonified.com/blog/dev/the-definitive-guide-to-get-vs-post/#comment-13569">replied</a>:</p>
<blockquote><p>
2. My claim is based on research done by Iain Lamb, cofounder of the Oddpost webmail startup that was acquired by Yahoo! and eventually became the basis for the all-new Yahoo! Mail.</p>
<p>His research showed “rather baffling finding: POST requests, made via the XMLHTTP object, send header and body data in separate tcp/ip packets [and therefore,] xmlhttp GET performs better when sending small amounts of data than an xmlhttp POST.”</p>
<p>That is why Yahoo includes the use of GET instead of POST as one of their high performance speed optimisation rules.
</p></blockquote>
<p>Simon Willison did some looking around and <a href="http://simonwillison.net/2009/Aug/18/performance/#comments">found more links for this</a>.  It was mentioned <a href="http://developer.yahoo.com/performance/rules.html">here</a> and <a href="http://yuiblog.com/blog/2007/03/01/performance-research-part-3/#comment-59531">here</a>, so it looks like <a href="http://lamb.cc/">Iain Lamb</a> did do this research, even though I couldn&#8217;t find a first person account of it.  This was enough information to make me curious, but not enough to answer all of my questions.  It was time to run some tests of my own.</p>
<p>So I updated my install of <a href="http://www.wireshark.org/">Wireshark</a> on Windows XP, turned off all of the packet reassembly options for HTTP decoding and started testing browsers.  My very simple XHR POST test page looked like this:</p>
<pre class="brush: xml;">
&lt;button type=&quot;button&quot; onclick=&quot;$.post('hello.txt', {name: 'Joseph'})&quot;&gt;XHR POST&lt;/button&gt;
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&gt;&lt;/script&gt;
</pre>
<p>When the button is clicked an XHR POST request is made to hello.txt with the name=Joseph for a tiny amount of data.  The domain I tested on sent along some cookies as well, but still left enough room for the tiny POST payload to fit in a single TCP packet.</p>
<p>Here are the results of the tests that I ran:</p>
<ul>
<li>IE 6 &#8211; 2 packets</li>
<li>IE 7 &#8211; 2 packets</li>
<li>IE 8 &#8211; 2 packets</li>
<li><b>Firefox 3.0.13 &#8211; 1 packet</b></li>
<li><b>Firefox 3.5.2 &#8211; 1 packet</b></li>
<li>Opera 9.27 &#8211; 2 packets</li>
<li>Safari 4.0.3 &#8211; 2 packets</li>
<li>Chrome 2.0.172.43 &#8211; 2 packets</li>
</ul>
<p>The short version of this is pretty easy to see, all of the browsers except for Firefox will use at least 2 packets for an XHR done over HTTP POST.  When I saw that Safari sent 2 packets I figured that Chrome would as well, but I tested it anyway just to make sure.</p>
<p>I looked at the data size of each packet in IE 6; the first packet had 575 bytes of data and the second packet had 11 bytes of data.  This lined up with the POST request which indicated that the content length was 11 bytes.  The second packet consisted only of the POST data.  Because Firefox sent less data in the user-agent string I increased the POST data so that it would exceed the combined total of the two IE packets to make sure I wasn&#8217;t running into any odd packet fragmentation.  The second packet in Opera, Safari and Chrome was also only the 11 bytes of POST data.</p>
<p>If this were <a href="http://dsc.discovery.com/fansites/mythbusters/mythbusters.html">Myth Busters</a> I&#8217;d call this myth confirmed.  While it is true that not ALL browsers will always use two packets, it appears that the two packet process is the rule, not the exception.  And with <a href="http://gs.statcounter.com/#browser-ww-monthly-200807-200908">IE still the most widely used browser</a> it&#8217;s very likely that a large portion of your users fall into the two packet category.  If on the other hand 95% of your users happen to be using Firefox, then sure, you can skip thinking about this.</p>


<p>Related posts:<ol><li><a href='http://josephscott.org/archives/2010/07/xhr-ajax-performance-get-or-post/' rel='bookmark' title='Permanent Link: XHR / AJAX Performance &#8211; GET or POST?'>XHR / AJAX Performance &#8211; GET or POST?</a></li>
<li><a href='http://josephscott.org/archives/2009/11/browser-stats-and-five-years-of-firefox/' rel='bookmark' title='Permanent Link: Browser Stats and Five Years of Firefox'>Browser Stats and Five Years of Firefox</a></li>
<li><a href='http://josephscott.org/archives/2010/02/recommended-reading-steve-souders-high-performance-web-sites/' rel='bookmark' title='Permanent Link: Recommended Reading: Steve Souders, High Performance Web Sites'>Recommended Reading: Steve Souders, High Performance Web Sites</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://josephscott.org/archives/2009/08/xmlhttprequest-xhr-uses-multiple-packets-for-http-post/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Detecting Client Side Time Zone Offset Via Javascript</title>
		<link>http://josephscott.org/archives/2009/08/detecting-client-side-time-zone-offset-via-javascript/</link>
		<comments>http://josephscott.org/archives/2009/08/detecting-client-side-time-zone-offset-via-javascript/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 20:40:52 +0000</pubDate>
		<dc:creator>Joseph Scott</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[time-zone]]></category>

		<guid isPermaLink="false">http://josephscott.org/?p=1347</guid>
		<description><![CDATA[Dealing with time zones can cause some real pains. As a result when storing a date/time in an application it is standard to store the date/time as GMT. This makes it easier on the application in comparing dates, but isn&#8217;t very friendly for users. The next step is for an applications to provide an option [...]


Related posts:<ol><li><a href='http://josephscott.org/code/javascript/detecting-time-zone-offset/' rel='bookmark' title='Permanent Link: Detecting Time Zone Offset'>Detecting Time Zone Offset</a></li>
<li><a href='http://josephscott.org/archives/2009/09/showing-your-last-tweet-with-javascript/' rel='bookmark' title='Permanent Link: Showing Your Last Tweet With Javascript'>Showing Your Last Tweet With Javascript</a></li>
<li><a href='http://josephscott.org/archives/2008/11/introducing-jquery-edit-in-place-jeip/' rel='bookmark' title='Permanent Link: Introducing jQuery Edit In Place (JEIP)'>Introducing jQuery Edit In Place (JEIP)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Dealing with time zones can cause some real pains.  As a result when storing a date/time in an application it is standard to store the date/time as GMT.  This makes it easier on the application in comparing dates, but isn&#8217;t very friendly for users.  The next step is for an applications to provide an option to indicate what time zone dates should be displayed as.  But what if we could skip that step and detect what time zone the client is in automatically?  Turns out Javascript can help out here.  The Date object has access to the time zone offset, here&#8217;s a simple function to get the number of hours the browser is plus or minus from GMT:</p>
<pre class="brush: jscript;">
function get_time_zone_offset( ) {
     var current_date = new Date( );
     var gmt_offset = current_date.getTimezoneOffset( ) / 60;
     return gmt_offset;
}
</pre>
<p>The getTimezoneOffset method of the Date object returns the difference in minutes from GMT, so dividing by 60 gives us the offset in hours.  By grabbing the offset as part of a login form you can detect the time zone offset for each user automatically.  An example HTML snippet might help make this more clear:</p>
<pre class="brush: jscript;">
&lt;p&gt;
Time Zone offset: &lt;span id=&quot;offset&quot;&gt;&lt;/span&gt;
&lt;/p&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
function get_time_zone_offset( ) {
    var current_date = new Date( );
    var gmt_offset = current_date.getTimezoneOffset( ) / 60;
    return gmt_offset;
}

$('#offset').html( get_time_zone_offset( ) );
&lt;/script&gt;
</pre>
<p>Save that as an HTML file, load it into your browser and it will show you what it detected for your time zone offset.  If you do decide to use this as part of your login form be sure to filter it for only valid values.  Never blindly trust data from a web browser.  Keep in mind that it can be a negative number and a have decimal values (for those areas that don&#8217;t use whole hour offsets for their time zone).</p>


<p>Related posts:<ol><li><a href='http://josephscott.org/code/javascript/detecting-time-zone-offset/' rel='bookmark' title='Permanent Link: Detecting Time Zone Offset'>Detecting Time Zone Offset</a></li>
<li><a href='http://josephscott.org/archives/2009/09/showing-your-last-tweet-with-javascript/' rel='bookmark' title='Permanent Link: Showing Your Last Tweet With Javascript'>Showing Your Last Tweet With Javascript</a></li>
<li><a href='http://josephscott.org/archives/2008/11/introducing-jquery-edit-in-place-jeip/' rel='bookmark' title='Permanent Link: Introducing jQuery Edit In Place (JEIP)'>Introducing jQuery Edit In Place (JEIP)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://josephscott.org/archives/2009/08/detecting-client-side-time-zone-offset-via-javascript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Introducing jQuery Edit In Place (JEIP)</title>
		<link>http://josephscott.org/archives/2008/11/introducing-jquery-edit-in-place-jeip/</link>
		<comments>http://josephscott.org/archives/2008/11/introducing-jquery-edit-in-place-jeip/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 14:00:17 +0000</pubDate>
		<dc:creator>Joseph Scott</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jeip]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://josephscott.org/?p=189</guid>
		<description><![CDATA[The first version of jQuery Edit In Place (JEIP) is ready. The UI and features basically the same as my older Prototype based edit in place code, with a few extra tidbits thrown in for good measure. It works in the typical jQuery style, as a plugin off of the main jQuery object. Here&#8217;s a [...]


Related posts:<ol><li><a href='http://josephscott.org/code/javascript/jquery-edit-in-place/' rel='bookmark' title='Permanent Link: jQuery Edit In Place (JEIP)'>jQuery Edit In Place (JEIP)</a></li>
<li><a href='http://josephscott.org/code/javascript/' rel='bookmark' title='Permanent Link: Javascript'>Javascript</a></li>
<li><a href='http://josephscott.org/archives/2010/07/xhr-ajax-performance-get-or-post/' rel='bookmark' title='Permanent Link: XHR / AJAX Performance &#8211; GET or POST?'>XHR / AJAX Performance &#8211; GET or POST?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The first version of <a href="/code/javascript/jquery-edit-in-place/">jQuery Edit In Place (JEIP)</a> is ready.  The UI and features basically the same as my older <a href="http://www.prototypejs.org/">Prototype</a> based edit in place code, with a few extra tidbits thrown in for good measure.</p>
<p>It works in the typical jQuery style, as a plugin off of the main jQuery object.  Here&#8217;s a simple example that makes all elements with a class of &#8216;edit-this&#8217; editable and sends the form data to &#8216;save.php&#8217;:</p>
<pre class="brush: jscript;">
$( &quot;.edit-this&quot; ).eip( &quot;save.php&quot; );
</pre>
<p>Check out the <a href="/code/javascript/jquery-edit-in-place/">JEIP</a> page for a details on what data the XHR includes and what the expected response needs to be.  There&#8217;s also a long list of options that the eip function supports.</p>
<p>You can dive in by taking a look at this <a href="/projects/code/javascript/jeip/example/">basic demo</a> and then downloading version 0.1.0 of <a href="http://jeip.googlecode.com/svn/tags/0.1.0/jeip.js">jeip.js</a>.</p>


<p>Related posts:<ol><li><a href='http://josephscott.org/code/javascript/jquery-edit-in-place/' rel='bookmark' title='Permanent Link: jQuery Edit In Place (JEIP)'>jQuery Edit In Place (JEIP)</a></li>
<li><a href='http://josephscott.org/code/javascript/' rel='bookmark' title='Permanent Link: Javascript'>Javascript</a></li>
<li><a href='http://josephscott.org/archives/2010/07/xhr-ajax-performance-get-or-post/' rel='bookmark' title='Permanent Link: XHR / AJAX Performance &#8211; GET or POST?'>XHR / AJAX Performance &#8211; GET or POST?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://josephscott.org/archives/2008/11/introducing-jquery-edit-in-place-jeip/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>