<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Seifi.org</title>
	
	<link>http://www.seifi.org</link>
	<description>A Web Development Blog by Mojo Seifi - seifi.org</description>
	<pubDate>Thu, 25 Jun 2009 05:06:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/seifiorg" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Wishlist: Browsers contain major JavaScript libraries in memory</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/xGoynkPvVK4/wishlist-browsers-contain-major-javascript-libraries-in-memory.html</link>
		<comments>http://www.seifi.org/javascript/wishlist-browsers-contain-major-javascript-libraries-in-memory.html#comments</comments>
		<pubDate>Fri, 06 Mar 2009 08:18:01 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[browsers]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=726</guid>
		<description><![CDATA[Let&#8217;s face it, without JavaScript the web would be a boring place. Unless you roll your own, well you need to use a library of some sort, and in most cases you need more than just one library to achieve your intended user experience.
Performance optimizations aside, and even if you concatenate all your JS files [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s face it, without JavaScript the web would be a boring place. Unless you roll your own, well you need to use a library of some sort, and in most cases you need more than just one library to achieve your intended user experience.</p>
<p>Performance optimizations aside, and even if you concatenate all your JS files into a single file, you still have to load the library into the browser after the request has been made, and you can&#8217;t do anything with it until that has finished loading.</p>
<p>Wouldn&#8217;t it be so great if the browser had a copy of YUI or jQuery or Dojo or Prototype or GWT in memory at all times? Then your library using decision would not be influenced by the size of the library but by its speed and performance, and perhaps features and functionality provided. I mean you don&#8217;t go loading new fonts and new plugins every single time you go to a new page right? Then why do we have to download the same 5 or 6 JS libraries over and over all day long as we browse the web? And if this was an option how many companies would spend time rolling out their own rather than adopting one?</p>
<p>I understand there would be tons of politics involved and it will probably never happen in a million years but it is worth a try. Perhaps at least a FF only version could be done through an add-on that loads the latest major version of all these libraries and checks for updates on startup, similar to how other plugins get updated in FireFox today. The browser would have to namespace the libraries to avoid confusion. Developers would then just do a test to see if the browser has a required library in memory, and if not then make a server call for it as a fail safe. </p>
<p>It would take lots of collaboration and standardization. JavaScript was the sleeping giant that was brought to center stage with the success of frameworks and libraries that have fueled its standardization and resulting wider adoption. Why not give those libraries some credit and package them into your browsers?</p>
<img src="http://feeds.feedburner.com/~r/seifiorg/~4/xGoynkPvVK4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/javascript/wishlist-browsers-contain-major-javascript-libraries-in-memory.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/javascript/wishlist-browsers-contain-major-javascript-libraries-in-memory.html</feedburner:origLink></item>
		<item>
		<title>How to Import Your Old Emails into Gmail the right way</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/I1GX7tv6IF0/how-to-import-your-old-emails-into-gmail-the-right-way.html</link>
		<comments>http://www.seifi.org/design/how-to-import-your-old-emails-into-gmail-the-right-way.html#comments</comments>
		<pubDate>Fri, 06 Mar 2009 03:40:02 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=720</guid>
		<description><![CDATA[Since Gmail is so powerful and easy to use, and is accessible from any web browser, you might be thinking about making it your primary account. Although it would be nice if you could have all your old emails in your Gmail account for your reference going forward. Also it would be great if you [...]]]></description>
			<content:encoded><![CDATA[<p>Since Gmail is so powerful and easy to use, and is accessible from any web browser, you might be thinking about making it your primary account. Although it would be nice if you could have all your old emails in your Gmail account for your reference going forward. Also it would be great if you could have them imported so that the date stamps, and all other email headers could be preserved.</p>
<p>It turns out, it is really simple to do. The trick is using the IMAP feature of Gmail. Here is how to import your emails from your current email client to Gmail. These steps assume you are using Outlook, but they should be pretty much the same for any other email client including Thunderbird, Entourage, Mac Mail etc. So let&#8217;s just get to the steps.</p>
<ol>
<li>Turn on IMAP in your Gmail account: In your Gmail account go to Settinngs > Forwarding and POP/IMAP > IMAP Access > Enable IMAP > Save Changes</li>
<li>Using the <a href="http://mail.google.com/support/bin/answer.py?hl=en&#038;ctx=mail&#038;answer=75726">settings for Gmail IMAP</a> for your Email Client, connect to your Gmail account using a new IMAP account. Once you&#8217;ve this done, you will see your Gmail account with labels listed as folders in your email client.</li>
<li>Now just highlight the emails you want to migrate to Gmail in your Personal folders and drag and drop them from your local account to the Gmail IMAP folders.</li>
</ol>
<p>That&#8217;s it! The emails get moved to Gmail with all the header in tact. It might take some time for the action to take place, if you have tons of email to migrate.</p>
<p>Notes:<br />
You can drag them to any folder (label you want) and you can also create new folders as you wish, which will become labels in Gmail. If you don&#8217;t want your old email to clutter your inbox, you can just drag them to the Gmail/All Mail folder which basically archives them and removes the Inbox label.</p>
<p>Another cool feature in Gmail is support for POP3 downloads from other accounts and additional SMTP accounts for sending emails. These can be configured under Settings > Accounts and can be good if you want to combine and consolidate other existing emails into your Gmail account. If you want to go all the way there is even a labs feature called Multiple Inboxes that can add a new column with configurable filters to the right side of your Gmail Inbox.</p>
<img src="http://feeds.feedburner.com/~r/seifiorg/~4/I1GX7tv6IF0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/design/how-to-import-your-old-emails-into-gmail-the-right-way.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/design/how-to-import-your-old-emails-into-gmail-the-right-way.html</feedburner:origLink></item>
		<item>
		<title>Lucky night at the Carcass gig in Hollywood</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/Hb4sKu2jEIU/lucky-night-at-the-carcass-gig-in-hollywood.html</link>
		<comments>http://www.seifi.org/design/lucky-night-at-the-carcass-gig-in-hollywood.html#comments</comments>
		<pubDate>Sat, 20 Sep 2008 01:31:46 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=698</guid>
		<description><![CDATA[It was a very lucky night for me last night at the Carcass reunion tour at the House of Blues.

The night started out with Finnish guys Rotten Sound which put on a solid performance. Next Aborted picked up and man those fellas really sounded good live, one heck of a pit frenzy. Chatted with some [...]]]></description>
			<content:encoded><![CDATA[<p>It was a very lucky night for me last night at the <a href="http://click.linksynergy.com/fs-bin/click?id=K1JiLusMcvw&#038;offerid=146261.689064899&#038;type=10&#038;subid=">Carcass</a> reunion tour at the House of Blues.<br />
<img src="http://www.seifi.org/wp-content/uploads/2008/09/carcasshollywood.gif" alt="" title="Carcass at House of Blues on Sunset 9/18/08" width="455" height="164" class="alignnone size-full wp-image-699" vspace="10" /></p>
<p>The night started out with Finnish guys <a href="http://click.linksynergy.com/fs-bin/click?id=K1JiLusMcvw&#038;offerid=146261.689064846&#038;type=10&#038;subid=">Rotten Sound</a> which put on a solid performance. Next <a href="http://click.linksynergy.com/fs-bin/click?id=K1JiLusMcvw&#038;offerid=146261.689065006&#038;type=10&#038;subid=">Aborted</a> picked up and man those fellas really sounded good live, one heck of a pit frenzy. Chatted with some old school and new school fans in and around the show during the breaks. Saw <a href="http://en.wikipedia.org/wiki/Shane_Embury">Shane</a> from <a href="http://click.linksynergy.com/fs-bin/click?id=K1JiLusMcvw&#038;offerid=146261.689065073&#038;type=10&#038;subid=">Napalm</a> hanging out at a T-shirt booth with a sign behind him saying &#8220;Don&#8217;t Ask Stupid Questions&#8221; which was pretty hilarious. </p>
<p>After Aborted <a href="http://click.linksynergy.com/fs-bin/click?id=K1JiLusMcvw&#038;offerid=146261.689064912&#038;type=10&#038;subid=">1349</a> went on which I had never seen live before. They use face makeup and are pretty fast for a black metal band. <a href="http://click.linksynergy.com/fs-bin/click?id=K1JiLusMcvw&#038;offerid=146261.689064941&#038;type=10&#038;subid=">Suffocation</a> presented a nice change in the pace of the pit and I have to say that was the only band that I actually understood what the singer was saying when talking to the audience between songs. They really grinded up the crowd when the played Infecting the Crypts.</p>
<p>Then finally the moment of truth, after a 30 minute setup period. CAR CASS CAR CASS chants started. There was a very creative intro with a formal sounding lady&#8217;s voice with a British accent reading a very morbid script. Really cool stuff, I wish I had that script or hear it again. Then for the first time in more than 15 years Carcass came out and they played one heck of show. Last time I had <a href="http://www.voicesfromthedarkside.de/interviews/death.htm">seen</a> them was with <a href="http://click.linksynergy.com/fs-bin/click?id=K1JiLusMcvw&#038;offerid=146261.689065069&#038;type=10&#038;subid=">Death</a> (<a href="http://www.voicesfromthedarkside.de/interviews/death.htm">RIP</a>) and <a href="http://click.linksynergy.com/fs-bin/click?id=K1JiLusMcvw&#038;offerid=146261.689065071&#038;type=10&#038;subid=">Pestilence</a> back on 10/05/1990 at the legendary Country Club (used in the Boogie Nights movie) in Reseda, which is no more. I can&#8217;t say enough about how truly good Carcass was last night. Truly a legendary band with a classy performance. Bill Steer, Michael Amott, Jeffery Walker, and <a href="http://en.wikipedia.org/wiki/Daniel_Erlandsson">Daniel Erlandsson</a> (deep resume) subbing in for Ken Owen who is out due to a brain hemorrhage. My prayers and best wishes go out to Ken. They played lots of their classics like &#8220;Incarnated Solvent Abuse&#8221; and &#8220;Exhume To Consume&#8221; and amazingly done. I would say the sounded even better than they did last time I saw them live.</p>
<p>So the lucky part was at the end when Daniel came out and threw out his drum sticks and one landed almost perfectly vertically and between my two feet. This was with about 50 other people trying to get it with their hands up in the air. I was so happy!! Here&#8217;s a photo of it, I will cherish it for ever.<br />
* WPG2 Plugin Not Validated *</p>
<p>Long live the English Death Grind core Kings Carcass. I&#8217;m predicting this tour will somehow influence them to create a new album once they get back home. They are playing tonight at the <a href="http://www.flickr.com/photos/spookytreasures/sets/72157607397804235/">Grand Ballroom in San Francisco</a>. Don&#8217;t miss it! It might be the last. Here are a few shots I took last night with my phone.<br />
* WPG2 Plugin Not Validated ** WPG2 Plugin Not Validated ** WPG2 Plugin Not Validated ** WPG2 Plugin Not Validated *</p>
<p>More old school death metal is on the way, <a href="http://click.linksynergy.com/fs-bin/click?id=K1JiLusMcvw&#038;offerid=146261.689065088&#038;type=10&#038;subid=">Obituary</a> are set to play HOB next Wednesday 9/24/08. I will try to make it there.</p>
<img src="http://feeds.feedburner.com/~r/seifiorg/~4/Hb4sKu2jEIU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/design/lucky-night-at-the-carcass-gig-in-hollywood.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/design/lucky-night-at-the-carcass-gig-in-hollywood.html</feedburner:origLink></item>
		<item>
		<title>What the Captcha? or why TicketMaster is lame</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/JJEjIdi5jms/what-the-captcha-or-why-ticketmaster-is-lame.html</link>
		<comments>http://www.seifi.org/business/what-the-captcha-or-why-ticketmaster-is-lame.html#comments</comments>
		<pubDate>Thu, 18 Sep 2008 22:26:27 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[business]]></category>

		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=689</guid>
		<description><![CDATA[I don&#8217;t know about you, but I&#8217;m really tired of trying to read those reCaptcha messages when going through TicketMaster sales screens. But hey at least they are helping a non-profit build an internet library which is great right? 
As if it is not bad enough that they have a pretty annoying and unusable multi-step, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.seifi.org/wp-content/uploads/2008/09/wtfcaptcha.gif" alt="" title="Jibberish" width="306" height="310" class="alignright size-full wp-image-690" hspace="15" align="right" />I don&#8217;t know about you, but I&#8217;m really tired of trying to read those reCaptcha messages when going through TicketMaster sales screens. But hey at least they are helping a non-profit build an internet library which is great right? </p>
<p>As if it is not bad enough that they have a pretty annoying and unusable multi-step, multi-page ticket sales process, recently they are starting to give out some borderline non-sense captcha validation images. How many people would just say &#8220;forget it&#8221; and leave? Well not many, since TM is an undocumented Monopoly for ticket sales in my opinion. Pretty bad user experience overall. I would love if they at least put the reCaptcha page on the same page as the ticket search form to cut down page loads. Better yet, make the whole process an ajax based system so you never have to leave the order page. It sucks to go through a blinding <a href="http://recaptcha.net/">reCaptcha</a> page and then get the dreaded &#8220;You&#8217;re Screwed&#8221; all sold out page. Just tell me right upfront: &#8220;Hey Don&#8217;t bother, no seats are available mr!&#8221; and don&#8217;t waste my time. I mean I have to pay an inflated ticket price + order processing fees + convenience fees + delivery fees. Can we at least get a convenient to use website?</p>
<p>I went ahead and did a 2 minute reshuffling of the order form for TicketMaster and this is what I came up with. Just put all forms on one page and got rid of the clutter. Progress bar and search results would appear on the same page.</p>
<p><img src="http://www.seifi.org/wp-content/uploads/2008/09/tm_redesign.gif" alt="" title="TicketMaster Redesign" width="419" height="361" class="alignnone size-full wp-image-695" vspace="25" /></p>
<p>I noticed also that there are now TicketMaster hosted auctions and scalping services on site. Wonder how far they have to push the envelope before regulators are forced to step in.</p>
<img src="http://feeds.feedburner.com/~r/seifiorg/~4/JJEjIdi5jms" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/business/what-the-captcha-or-why-ticketmaster-is-lame.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/business/what-the-captcha-or-why-ticketmaster-is-lame.html</feedburner:origLink></item>
		<item>
		<title>Seinfeld Microsoft Ads</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/JBV82aV5HcQ/seinfeld-microsoft-ads.html</link>
		<comments>http://www.seifi.org/microsoft/seinfeld-microsoft-ads.html#comments</comments>
		<pubDate>Mon, 08 Sep 2008 01:23:43 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[microsoft]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=684</guid>
		<description><![CDATA[Finally got a look at the Bill Gates / Jerry Seinfeld ads for Microsoft. Pretty unconventional stuff and sometimes funny. There is no mention of Apple in the ad at all, which is what I was naturally expecting to see. This ad made me realize how much I miss Seinfeld. It been pretty cool to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.seifi.org/wp-content/uploads/2008/09/shocircusclowbill-150x150.jpg" width="150" height="150" border="0" align="right" hspace="10" />Finally got a look at the Bill Gates / Jerry Seinfeld ads for Microsoft. Pretty unconventional stuff and sometimes funny. There is no mention of Apple in the ad at all, which is what I was naturally expecting to see. This ad made me realize how much I miss Seinfeld. It been pretty cool to have other ads with Morty, Newman and Elaine. Take a look for yourself. I can go for a Churro right about now!</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/IiVMPgCf6YY&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/IiVMPgCf6YY&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Here is an alternate pwned ending version, pretty weird.<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/fSQMg3gc1r4&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/fSQMg3gc1r4&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Brand new Ad<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/gBWPf1BWtkw&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/gBWPf1BWtkw&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<img src="http://feeds.feedburner.com/~r/seifiorg/~4/JBV82aV5HcQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/microsoft/seinfeld-microsoft-ads.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/microsoft/seinfeld-microsoft-ads.html</feedburner:origLink></item>
		<item>
		<title>Google Chrome First Impressions</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/czcG-iq-gq4/google-chrome-first-impressions.html</link>
		<comments>http://www.seifi.org/javascript/google-chrome-first-impressions.html#comments</comments>
		<pubDate>Tue, 02 Sep 2008 19:02:35 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[browsers]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=677</guid>
		<description><![CDATA[Yet another browser? Well here we go again. Let&#8217;s take a look at Chrome and see what it has to offer. The download page is located here. The installer for Windows XP is only 474KB! You can watch the press conference video about Google Chrome or read the Google Chrome Book in the meantime.
What we [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.seifi.org/wp-content/uploads/2008/09/googlechromelogo.jpg" alt="" title="Google Chrome Logo" width="55" height="53" class="alignnone size-full wp-image-683" hspace="15" align="right" />Yet another browser? Well here we go again. Let&#8217;s take a look at Chrome and see what it has to offer. The download page is <a href="http://www.google.com/chrome">located here</a>. The installer for Windows XP is only 474KB! You can watch the <a href="http://google.client.shareholder.com/Visitors/event/build2/MediaPresentation.cfm?MediaID=33101&#038;Player=1">press conference video</a> about Google Chrome or read the <a href="http://www.google.com/googlebooks/chrome/index.html">Google Chrome Book</a> in the meantime.</p>
<h3>What we knew so far about Chrome</h3>
<ul>
<li>Uses <a href="http://code.google.com/apis/v8/">V8 JavaScript engine</a> which supports Classes and compilation. There is a <a href="http://code.google.com/apis/v8/run.html">V8 JavaScript benchmark suite</a> that gives FireFox 3 a score of 83, while giving Chrome a score of 1213! Safari 3 gets a score of 128. Judging by this alone, V8 blows away the competition.</li>
<li>Uses Webkit rendering engine.</li>
<li>Tabs run as independent processes which can be managed.</li>
<li>Lots of other <a href="http://gears.google.com/chrome/intl/en/features.html">features</a>.</li>
</ul>
<h3>First Impressions</h3>
<ul>
<li>Installation was a breeze and imported FireFox settings.</li>
<li>No status bar, You only see the status bar when you hover over a hyperlink.</li>
<li>The Task Manager (Shift + Escape) updates in real time and shows memory, CPU and network usage for each tab, each plugin, and the main Chrome process separately. There is also a link to Stats for Nerds with lots more gritty info.</li>
<li>The Flash plugin is extremely CPU usage intensive and causes sluggishness when scrolling. I just loaded a popular <a href="http://www.adobe.com/products/acrobat/">flash website</a> and noticed my machine came down to a near halt. It seems to happen more with Flash files that contain infinite loops, using as much as 70% of the CPU.<br />
<img src="http://www.seifi.org/wp-content/uploads/2008/09/chrome_taskmanager_cpu.gif" alt="" title="Chrome Task Manager CPU Usage" width="377" height="164" class="alignnone size-full wp-image-681" />
</li>
<li>The built in JavaScript console looks like a combination of <a href="http://www.seifi.org/javascript/firebug_tips_and_tricks.html">FireBug</a> and <a href="http://www.seifi.org/css/whats-new-in-safari-31-web-inspector-and-sinppet-editor.html">Web Inspector</a>.</li>
<li>There is a built in JavaScript Debugger (Alt + `)</li>
<li>Passes the <a href="http://www.webstandards.org/files/acid2/test.html">Acid 2 test</a>.</li>
<li>Chrome gets a score of 78 on the <a href="http://acid3.acidtests.org/">Acid 3 test</a>, which is higher than FireFox 3 at 57, <a href="http://webkit.org/blog/158/the-acid-3-test/">Safari</a> at 72, and Opera at 45.<br />
<img src="http://www.seifi.org/wp-content/uploads/2008/09/chrome_acid3.gif" alt="" title="Chrome Acid 3 Results" width="450" height="369" class="alignnone size-full wp-image-682" />
</li>
<li>Omnibar - this is the URL/location bar in Chrome that has some fuzzy logic built in to suggest &#8220;smart&#8221; autocompletes. This is the current order of the drop down in the auto complete list. There seems to be no way of changing this ordering as of now. Would be nice to be able to customize them.<br />
&nbsp;<br />
<img src="http://www.seifi.org/wp-content/uploads/2008/09/omnibar.gif" alt="" title="Google Chrome Omnibar - Search Amazon" width="396" height="173" /><br />
&nbsp;</p>
<ol>
<li>Search Google for FOOBAR</li>
<li>FOOBAR/ (I&#8217;m not sure how useful this one is really)</li>
<li>Link to the FOOBAR Wikipedia page</li>
<li>Link to I&#8217;m Feeling Lucky URL for term FOOBAR. This item gives you the ability to search within the URL. For example if you type in Amazon in the Omnibar and select the amazon.com option using the down arrows, you will see &#8220;Press Tab to Search Amazon&#8221;. See below instruction on implementing this search functionality for your website.
</li>
<li>Search Google for FOOBAR ANOTHER TERM</li>
<li>Search Google for FOOBAR ANOTHER TERM</li>
<li>A page in your history pertaining to FOOBAR</li>
<li>Link to history search for pages about FOOBAR</li>
</ol>
</li>
</ul>
<h3>Cool Developer related stuff in Chrome</h3>
<p>Google Chrome User Agent String: </p>
<blockquote><p>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.X.Y.Z Safari/525.13.</p></blockquote>
<p>Chrome has a menu option called &#8220;Create application shortcuts&#8230;&#8221; that uses Google Gears to create a shortcut to your webapp. Users can choose to place the shortcut to your webapp on their Desktop, on the Start menu and even the Quick launch bar in Windows. This is a pretty powerful feature. When a user clicks this icon, Chrome opens up without the Omnibar, and your website will appear in an &#8220;Application&#8221; format. You can customize how Chrome creates these shortcuts using meta tags. These tags are named: application-name, description, application-url, and shortcut icons in both 32&#215;32 or 48&#215;48 formats. The favicon is used if not specified. For example you can use the following HTML code in the head of your document. Note that with the Mozilla added support which is used in Chrome, you can use any supported graphic format as your favicon, and not just the old school <a href="http://en.wikipedia.org/wiki/Favicon">favicon.ico</a> file.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;head&gt;
  &lt;meta name=&quot;application-name&quot; content=&quot;Gmail&quot;/&gt;
  &lt;meta name=&quot;description&quot; content=&quot;Google's approach to email&quot;/&gt;
  &lt;meta name=&quot;application-url&quot; content=&quot;http://www.gmail.com&quot;/&gt;
  &lt;link rel=&quot;icon&quot; href=gmail_32x32.png sizes=&quot;32x32&quot;/&gt;
  &lt;link rel=&quot;icon&quot; href=gmail_48x48.png sizes=&quot;48x48&quot;/&gt;
&lt;/head&gt;</pre></div></div>

<p>To open a new tab from your webapp in a separate process using JavaScript you can do this in Chrome.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
w.<span style="color: #660066;">opener</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
w.<span style="color: #660066;">document</span>.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://differentsite.com/index.html&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Chrome lets users search your website from its ominbar. To enable and include your website&#8217;s search in Chrome you have to create an <a href="http://www.opensearch.org">OpenSearch</a> description document (OSDD).<br />
For example you can create something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;OpenSearchDescription</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://a9.com/-/spec/opensearch/1.1/&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ShortName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Web Search<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ShortName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Use Example.com to search the Web.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Tags<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>example web<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Tags<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Contact<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>admin@example.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Contact<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Url</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;application/atom+xml&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;http://example.com/?q={searchTerms}&amp;amp;pw={startPage?}&amp;amp;format=atom&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Url</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;application/rss+xml&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;http://example.com/?q={searchTerms}&amp;amp;pw={startPage?}&amp;amp;format=rss&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Url</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/html&quot;</span> </span>
<span style="color: #009900;">        <span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;http://example.com/?q={searchTerms}&amp;amp;pw={startPage?}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LongName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Example.com Web Search<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LongName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Image</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;64&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;64&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;image/png&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>http://example.com/websearch.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Image</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;16&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;16&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;image/vnd.microsoft.icon&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>http://example.com/websearch.ico<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Query</span> <span style="color: #000066;">role</span>=<span style="color: #ff0000;">&quot;example&quot;</span> <span style="color: #000066;">searchTerms</span>=<span style="color: #ff0000;">&quot;cat&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Developer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Example.com Development Team<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Developer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Attribution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     Search data Copyright 2005, Example.com, Inc., All Rights Reserved
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Attribution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;SyndicationRight<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>open<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/SyndicationRight<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;AdultContent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/AdultContent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Language<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>en-us<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Language<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;OutputEncoding<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>UTF-8<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/OutputEncoding<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;InputEncoding<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>UTF-8<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/InputEncoding<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/OpenSearchDescription<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Fore more tips read the Google Chrome <a href="http://gears.google.com/chrome/intl/en/webmasters-faq.html">FAQ for web developers</a> page.</p>
<p>ps. Don&#8217;t use the <a href="http://gears.google.com/chrome/">Google gears Chrome download page</a> which gives a JavaScript error!</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">_GU_SetupOneClick <span style="color: #000066; font-weight: bold;">is</span> not defined
<span style="color: #000066;">onload</span><span style="color: #009900;">&#40;</span>load <span style="color: #009900;">&#41;</span></pre></div></div>

<img src="http://feeds.feedburner.com/~r/seifiorg/~4/czcG-iq-gq4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/javascript/google-chrome-first-impressions.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/javascript/google-chrome-first-impressions.html</feedburner:origLink></item>
		<item>
		<title>JavaScript Arguments</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/K9mAjaVYN6Y/javascript-arguments.html</link>
		<comments>http://www.seifi.org/javascript/javascript-arguments.html#comments</comments>
		<pubDate>Tue, 19 Aug 2008 23:16:20 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[business]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=673</guid>
		<description><![CDATA[The arguments object in JavaScript is a local variable in any function that provides some nice features we can use in our code. Here is the list of its properties and related properties of the Function object.
arguments itself returns an object that looks like an array (but not really an array) of the arguments passed [...]]]></description>
			<content:encoded><![CDATA[<p>The arguments object in JavaScript is a local variable in any function that provides some nice features we can use in our code. Here is the list of its properties and related properties of the Function object.</p>
<p><code>arguments</code> itself returns an object that looks like an array (but not really an array) of the arguments passed to the function.</p>
<p>Prior to JavaScript 1.4 the <code>Function</code> object also had a similar <code>arguments</code> property, which is now deprecated.</p>
<p>However the Function object comes with a few other useful properties that we can still use to get argument related data.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> callTaker<span style="color: #009900;">&#40;</span>a<span style="color: #339933;">,</span>b<span style="color: #339933;">,</span>c<span style="color: #339933;">,</span>d<span style="color: #339933;">,</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// arguments properties</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>arguments<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>arguments.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>arguments.<span style="color: #660066;">callee</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>arguments<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">// Function properties</span>
 console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>callTaker.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>callTaker.<span style="color: #660066;">caller</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>arguments.<span style="color: #660066;">callee</span>.<span style="color: #660066;">caller</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>arguments.<span style="color: #660066;">callee</span>.<span style="color: #660066;">caller</span>.<span style="color: #660066;">caller</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>callTaker.<span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>callTaker.<span style="color: #660066;">constructor</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> callMaker<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  callTaker<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;foo&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;bar&quot;</span><span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span>document<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  callMaker<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>For demonstration purposes, you can <a href="" onclick="return initDemo();">run the init function</a> above and view the logs in FireBug.</p>
<h3>arguments object and its properties</h3>
<p><code><strong>arguments</strong></code> returns ["foo", "bar", Window, Document]</p>
<p><code><strong>arguments.length</strong></code> returns 4</p>
<blockquote class="note"><p>Note: even though our function has a signature with 5 arguments, length returns only 4 here. This is because the caller sent us only 4 arguments. See below for how we can use Function&#8217;s length property to find the number of expected arguments.</p></blockquote>
<p><code><strong>arguments.callee</strong></code> returns callTaker(a, b, c, d, e)</p>
<blockquote class="note"><p>Note: callee shows us the signature of the currently executing function and is useful when trying to make recursive calls to a function within its own body.</p></blockquote>
<p><code><strong>arguments[1]</strong></code> returns bar</p>
<blockquote class="note"><p>Note: arguments can also be set for functions in an array like format. For example you can set the second argument like this: <code><strong>arguments[1] = &#8216;moo&#8217;;</strong></code>
</p></blockquote>
<h3>Function object and its argument related properties</h3>
<p><code><strong>callTaker.length</strong></code> returns 5</p>
<blockquote class="note"><p>Note: This is the expected number of arguments.</p></blockquote>
<p><code><strong>callTaker.caller</strong></code> is the same as <code><strong>arguments.callee.caller</strong></code> and returns callMaker()</p>
<blockquote class="note"><p>Note: we can go up the stack trace and get the caller of the caller etc. For example we can find the function that called callMaker using <code>arguments.callee.caller.caller</code> which returns init().</p></blockquote>
<p><code><strong>callTaker.name</strong></code> returns callTaker</p>
<p><code><strong>callTaker.constructor</strong></code> returns Function()</p>
<blockquote class="note"><p>Note: Since we have not modified the basic behavior, we see the built in function that creates an object&#8217;s prototype for our function, which is the Function object.
</p></blockquote>
<h3>Basic Usage Sample</h3>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> dataArray <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;One&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;Two&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;Three&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;Four&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> lister <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> createList<span style="color: #009900;">&#40;</span>list<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>arguments.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> result <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;&quot;</span> <span style="color: #339933;">+</span> arguments<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> arguments<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   result <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&lt;li&gt;&quot;</span> <span style="color: #339933;">+</span> arguments<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  result <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&lt;/&quot;</span> <span style="color: #339933;">+</span> arguments<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;l&gt;&quot;</span><span style="color: #339933;">;</span>
  document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>arguments<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> result<span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> makeList<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 lister<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;list_HTML&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;ul&quot;</span><span style="color: #339933;">,</span>dataArray<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><a href="" onclick="return makeListDemo();">Run the sample</a><br />
<span id="list_HTML"></span></p>
<p>References:<br />
<a href="http://eriwen.com/javascript/js-stack-trace/" target="_blank">JavaScript Stack Trace</a><br />
<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Function" target="_blank">Function</a><br />
<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Functions:arguments" target="_blank">arguments</a></p>
<style>code strong{color:#F24C8B;font-family:verdana;font-weight:normal;}blockquote.note{margin:0 0 10px;}</style>
<p><script src="http://www.seifi.org/wp-content/uploads/2008/08/arguments.js"></script></p>
<img src="http://feeds.feedburner.com/~r/seifiorg/~4/K9mAjaVYN6Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/javascript/javascript-arguments.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/javascript/javascript-arguments.html</feedburner:origLink></item>
		<item>
		<title>Yummy Yummy, New Delicious Design</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/khQxmSXoyTQ/yummy-yummy-new-delicious-design.html</link>
		<comments>http://www.seifi.org/css/yummy-yummy-new-delicious-design.html#comments</comments>
		<pubDate>Fri, 01 Aug 2008 00:20:13 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[css]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[portals]]></category>

		<category><![CDATA[ui]]></category>

		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=670</guid>
		<description><![CDATA[Looks like the long awaited web 2.0izing of the del.icio.us website is finally here. Very sleek and sexy is my first impression.

 Take a look at some of the older user interfaces to get a sense for how del.icio.us has evolved until now. Aside from the new look there are new features as well. The [...]]]></description>
			<content:encoded><![CDATA[<p>Looks like the <a href="http://www.techcrunch.com/2007/09/06/exclusive-screen-shots-and-feature-overview-of-delicious-20-preview/" target="_blank">long awaited</a> web 2.0izing of the del.icio.us website is <a href="http://www.delicious.com" target="_blank">finally here</a>. Very sleek and sexy is my first impression.</p>
<p><img src="http://www.seifi.org/wp-content/uploads/2008/07/new_delicious.jpg" alt="" title="New Delicious Homepage Design" width="450" height="278" class="alignnone size-full wp-image-671" /></p>
<p> Take a look at some of the <a href="http://www.flickr.com/photos/joshu/sets/72157600740166824/" target="_blank">older user interfaces</a> to get a sense for how del.icio.us has <a href="http://delicious.com/help/whatsnew" target="_blank">evolved</a> until now. Aside from the new look there are new features as well. The delicious dev team has supposedly completely rewritten the code base, to allow for a more scalable and spry tool.</p>
<p><strong>New features:</strong></p>
<p><img src="http://www.seifi.org/wp-content/uploads/2008/07/delicious_changes_animation.gif" alt="" title="delicious_changes_animation" width="250" height="154" class="alignnone size-full wp-image-672" align="left" hspace="20" /> <strong>Navigation</strong>: New simple CSS tabs with onclick drop down menus make is simple to find your tasty bookmarks. The navigation structures seems to borrow from Flickr. Search also comes with a simple drop down option list to find stuff in your bookmarks, network or everyone. </p>
<p><strong>Bookmarks</strong>: You have Title view, regular view and Full View options here. View your popular bookmarks to filter the good stuff and filter down more by choosing fresh only. </p>
<p><strong>Sidebar</strong>: is updated to show a relative set of tags related to your left content pane. </p>
<p><strong>Action Box</strong>: This light blue box in the sidebar shows the common tasks for the given page. </p>
<p><strong>Search URL</strong>: This is a reverse search for bookmarks and pulls in the ones with the given URL along with tags used for that URL by each user, broken down in chronological order. You can also view the notes added by each user to the given URL.</p>
<p><strong>Settings</strong>: The settings page is laid out with all the actions listed on one page, similar to a sitemap.</p>
<p><strong>Forums</strong>: There is a support forum that looks more like a categorized list of links than a forum. I like the non-cluttered design. Reminds me of Drupal.</p>
<p>As in the past <a href="http://delicious.com/help/api" target="_blank">their API</a> is still available for developer consumption.</p>
<img src="http://feeds.feedburner.com/~r/seifiorg/~4/khQxmSXoyTQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/css/yummy-yummy-new-delicious-design.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/css/yummy-yummy-new-delicious-design.html</feedburner:origLink></item>
		<item>
		<title>1st iPhone post from WordPress app</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/f8tJtBBS_tQ/1st-iphone-post-from-wordpress-app.html</link>
		<comments>http://www.seifi.org/software/1st-iphone-post-from-wordpress-app.html#comments</comments>
		<pubDate>Tue, 22 Jul 2008 06:50:00 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[iphone]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.seifi.org/software/1st-iphone-post-from-wordpress-app.html</guid>
		<description><![CDATA[Appstore app for WordPress is out &#8230; whooptie doo

]]></description>
			<content:encoded><![CDATA[<p>Appstore app for WordPress is out &#8230; whooptie doo</p>
<p><img src="http://www.seifi.org/wp-content/uploads/2008/07/p-640-480-fcd3d24f-80a2-445f-b8e1-525fff3d808c.jpeg" alt="photo" width="225" height="300" class="alignnone size-full wp-image-364" /></p>
<img src="http://feeds.feedburner.com/~r/seifiorg/~4/f8tJtBBS_tQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/software/1st-iphone-post-from-wordpress-app.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/software/1st-iphone-post-from-wordpress-app.html</feedburner:origLink></item>
		<item>
		<title>Understanding &amp; Taming Collapsing Margins in CSS</title>
		<link>http://feedproxy.google.com/~r/seifiorg/~3/67xS9O_MHq4/understanding-taming-collapsing-margins-in-css.html</link>
		<comments>http://www.seifi.org/css/understanding-taming-collapsing-margins-in-css.html#comments</comments>
		<pubDate>Sat, 19 Jul 2008 00:24:37 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
		
		<category><![CDATA[css]]></category>

		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=664</guid>
		<description><![CDATA[The concept of collapsing margins is very simple but to fully understanding its behaviors in CSS can be tough at first. When 2 or more vertical margins hit each other, they are combined (collapsed) to form just one margin. The largest of the margins is the one rendered in the flow. The formula in theory [...]]]></description>
			<content:encoded><![CDATA[<p>The concept of collapsing margins is very simple but to fully understanding its behaviors in CSS can be tough at first. When 2 or more vertical margins hit each other, they are combined (collapsed) to form just one margin. The largest of the margins is the one rendered in the flow. The formula in theory then, for the bottom or top margin of the adjoining boxes will be:</p>
<p><code>margin-top | margin-bottom: max( margin<sup>box 1</sup> &#8230; margin<sup>box n</sup>)</code></p>
<p>When it comes to the real world there are 3 major categories of margin collapsing. So let&#8217;s figure out how these 3 types of collapsing work and how to tame them.</p>
<h3 style="clear:both;">1) Adjoining boxes of sibling elements:</h3>
<p>The bottom margin of an in-flow block-level element is always adjoining to the top margin of its next in-flow block-level sibling, unless that sibling has clearance.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"> &lt;div&gt;
  &lt;div&gt;content&lt;/div&gt;
  &lt;div&gt;content&lt;/div&gt;
 &lt;/div&gt;</pre></div></div>

<p><img src="http://www.seifi.org/wp-content/uploads/2008/07/sibling_collapsing.png" alt="" title="Sibling Collapsing" width="490" height="334" class="alignnone size-full wp-image-666" /></p>
<p>While margin collapsing is great for written text such as paragraphs and headings etc., it can get somewhat tricky if you&#8217;re trying to get pixel perfect spacing between your boxes, so there might come a time when you want to disable margin collapsing. Take a look at these examples that suggest ways of uncollapsing your margins.</p>
<div style="padding:0px;border:1px dashed black;margin:20px;background-color:#FEFFAF;overflow:hidden">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
2 child boxes inside a parent box, all 3 boxes have 20px margins, parent has <em>1px border</em> to avoid ancestor collapsing
</div>
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
2 child boxes have their top and bottom margins collapsed. Therefore the middle margin is 20px and not 40px. Most of the time this is what we want.
</div>
</div>
<div style="padding:0px;border:1px dashed black;margin:20px;background-color:#FEFFAF;overflow:hidden">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;float:left;clear:both">
2 child boxes inside a parent box, all have 20px margins, parent has <em>1px padding</em> to avoid ancestor collapsing</div>
<div style="padding:0px;border:0px dashed black;margin:0px;background-color:#BFFFFF;clear:left"></div>
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;float:left;clear:both;">
2 child boxes are this time <em>floated left and cleared</em>. Additionally clearing divs are added for Internet Explorer support. This method gives us 40px in the middle by disabling margin collapsing of the two siblings.
</div>
<div style="padding:0px;border:0px dashed black;margin:0px;background-color:#BFFFFF;clear:left"></div>
</div>
<div style="padding:0px;border:1px dashed black;margin:20px;background-color:#FEFFAF;">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
2 child boxes inside a parent box, all have 20px margins, parent has <em>1px padding</em> to avoid ancestor collapsing
</div>
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;display:inline-block;">
This time we give the 1st child box a <em>display of inline-block</em> which is supposed to make its margins not collapse. While this inline-block behavior works like a charm in compliant browsers, unfortunately it does not work in IE7.
</div>
</div>
<div style="padding:0px;border:1px dashed black;margin:20px;background-color:#FEFFAF;">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
2 child boxed inside a parent box, all have 20px margins, parent has <em>1px padding</em> to avoid ancestor collapsing
</div>
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;display:inline-block;display:inline-table;">
Finally this we use a <em>display of inline-table</em> on the first child box. This behavior works in IE7 and FF2 and above. Although inline-table does not break out of collapsing in IE7. You may also try overloading both properties on the element as a fail safe like: display:inline-block;display:inline-table;
</div>
</div>
<p>So it seems the only way to break out of collapsing that works in both IE and FF is our second example by using floats and clear combined. You might have noticed the above 4 boxes themselves also have 20px margins which have collapsed to form 20px margins within our 3 adjoining sections in the middle. </p>
<h3 style="clear:both;">2) Adjoining boxes of ancestor elements:</h3>
<p>The top or bottom margins of contained elements will always collapse together to form one margin. If the element&#8217;s margins are collapsed with its parent&#8217;s top margin, the top border edge of the box is defined to be the same as the parent&#8217;s. Below is the sample HTML and diagram and explanation of how to avoid this.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"> &lt;div&gt;
  &lt;div&gt;content&lt;/div&gt;
 &lt;/div&gt;</pre></div></div>

<p><img src="http://www.seifi.org/wp-content/uploads/2008/07/ancestor_collapsing.png" alt="" title="Ancestor Margin Collapsing" width="490" height="381" class="alignnone size-full wp-image-665" /><br />
Remember that collapsing only happens if the margins actually touch one another. In this case the inner box&#8217;s margin ends where the outer box&#8217;s margin starts, therefore they are touching. One easy way to avoid this type of margin collapsing is to add either vertical borders or vertical padding to the parent box. Take a look at these examples:</p>
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#FEFFAF;">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
2 nested boxes, both have 20px margins, parent div has <em>no border or padding</em>. Note how the margins of both boxes collapse. The parent box takes over the margin of the child.
<p style="color:#5D478B;margin:10px;">You might be wondering, so why does the margin stick out of the outer div instead of being applied to inner div? Remember that the height of containers are calculated based on the the height if their children, and a block level element&#8217;s height is measured from its top border edge to its bottom border edge. So the outer div only honors the content height of its children when calculating its own height, and since margins are already collapsed, the inner margins will appear to protrude out of the parent.</p>
</div>
</div>
<div style="padding:0px;border:1px dashed black;margin:20px;background-color:#FEFFAF;">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
2 nested boxes, both have 20px margins, parent has a <em>1px border</em>, which disables the collapsing.
</div>
</div>
<div style="padding:0px;border:1px solid transparent;margin:20px;background-color:#FEFFAF;">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
2 nested boxes, both have 20px margins, parent has a <em>1px transparent border</em> for an invisible solution.
</div>
</div>
<div style="padding:1px;border:0px dashed black;margin:20px;background-color:#FEFFAF;">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
2 nested boxes, both have 20px margins, parent has <em>1px padding</em> again for making it less visible in our UI.
</div>
</div>
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#FEFFAF;overflow:hidden;">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
2 nested boxes, both have 20px margins, parent div has its <em>overflow hidden</em>. Great: Now we don&#8217;t have to add 2 extra pixels to our layout, but note that this method only works with ancestors.
</div>
</div>
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#FEFFAF;float:left;">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;">
nested boxes, both have 20px margins, parent div is <em>floated left</em>. Works great if you are capable of using floats in your current flow.
</div>
</div>
<h3 style="clear:both;">3) Self collapsing boxes:</h3>
<p>Empty block level elements result in a special case of margin collapsing. Their top and bottom margins actually touch each other and they basically self destruct based on the rules of margin collapsing. According to the W3C: An element&#8217;s own margins are adjoining if the &#8216;min-height&#8217; property is zero, and it has neither top or bottom borders nor top or bottom padding, and it has a &#8216;height&#8217; of either 0 or &#8216;auto&#8217;, and it does not contain a line box, and all of its in-flow children&#8217;s margins (if any) are adjoining.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"> &lt;div&gt;
  &lt;div&gt;content&lt;/div&gt;
  &lt;div&gt;&lt;/div&gt;
  &lt;div&gt;content&lt;/div&gt;
 &lt;/div&gt;</pre></div></div>

<div style="padding:0px;border:1px dashed black;margin:20px;background-color:#FEFFAF;">
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;clear:both;">
3 child boxes inside a parent box, all have 20px margins, parent has <em>1px borders</em> to avoid ancestor collapsing
</div>
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#FEFFAF;"></div>
<div style="padding:0px;border:0px dashed black;margin:20px;background-color:#BFFFFF;clear:both;">there are 3 child boxes inside, but the middle child box collapses on itself, and then the surrounding 2 boxes collapse on its margins again, so the end result is that our empty box is not visible and basically does not affect the flow at all. Empty block level elements are often used for DOM manipulations and Ajax data storage and now we know why they don&#8217;t affect the layout.
</div>
</div>
<p>Another obvious way to break out of collapsing is changing the display to absolute. Finally, note that the margins of the root element box in any document never collapse. There are a few rules for negative margins when it comes to collapsing. I will try to write another post on this later.</p>
<p>I&#8217;ve created a <a href="http://seifi.org/wp-content/uploads/2008/07/collapsingmargins/">demo page here</a> with the above examples.</p>
<h3>References and Acknowledgments</h3>
<p><a target="_blank" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">W3C Box Model</a> Collapsing Margins,<br />
<a target="_blank" href="http://www.andybudd.com/archives/2003/11/no_margin_for_error/">Andy Budd</a> No margin for error,<br />
<a target="_blank" href="http://www.researchkitchen.de/blog/archives/css-autoheight-and-margincollapsing.php">Research Kitchen</a> CSS Autoheight and Margin Collapsing,<br />
<a target="_blank" href="http://complexspiral.com/publications/uncollapsing-margins">Complex Spiral</a> Uncollapsing-margins,<br />
<a target="_blank" href="http://dev.l-c-n.com/IEW/collapsing-margins-inline-block.php">La Chatte Noire</a> tests: block formatting context, display:inline-block and margin collapsing</p>
<img src="http://feeds.feedburner.com/~r/seifiorg/~4/67xS9O_MHq4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/css/understanding-taming-collapsing-margins-in-css.html/feed</wfw:commentRss>
		<feedburner:origLink>http://www.seifi.org/css/understanding-taming-collapsing-margins-in-css.html</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.983 seconds -->
