<?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>Intrepid Blog &#187; dom</title>
	<atom:link href="http://blog.affien.com/archives/tag/dom/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.affien.com</link>
	<description>A few thoughts</description>
	<lastBuildDate>Mon, 01 Mar 2010 00:58:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Damned DOM (1)</title>
		<link>http://blog.affien.com/archives/2009/06/22/damned-dom-1/</link>
		<comments>http://blog.affien.com/archives/2009/06/22/damned-dom-1/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 14:34:51 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[stupid]]></category>

		<guid isPermaLink="false">http://blog.affien.com/?p=391</guid>
		<description><![CDATA[When I wanted to react to any changes to a input textbox immediately, my first instrinct was to use onChange.  onChange, however, is called when the input loses focus.  onKeyPress then?  Isn&#8217;t called on backspaces.  onKeyDown, maybe?  It does get called, but the effect of the keystroke isn&#8217;t yet applied, [...]]]></description>
			<content:encoded><![CDATA[<p>When I wanted to react to any changes to a <code>input</code> textbox immediately, my first instrinct was to use <code>onChange</code>.  <code>onChange</code>, however, is called when the <code>input</code> loses focus.  <code>onKeyPress</code> then?  Isn&#8217;t called on backspaces.  <code>onKeyDown</code>, maybe?  It does get called, but the effect of the keystroke isn&#8217;t yet applied, for the return value determines whether it that is done in the first place. (Same story for <code>onKeyPress</code> by the way.) <code>onKeyUp</code> does work a bit, except if someone is holding down a single key, for a while.</p>
<p>The solution: hook <code>onKeyUp</code> and use <code>setTimeout</code> with a timeout of 0.  Yugh.  I hate DOM.</p>
<p><em><ins>Big Fat Disclaimer</ins>: I actually tested this only on one browser.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2009/06/22/damned-dom-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stupid IE (2)</title>
		<link>http://blog.affien.com/archives/2007/09/02/stupid-ie-2/</link>
		<comments>http://blog.affien.com/archives/2007/09/02/stupid-ie-2/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 13:02:46 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Code sniplets]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[stupid]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2007/09/02/stupid-ie-2/</guid>
		<description><![CDATA[To create a multiple select-box with javascript you need a very ugly hack in IE.
if (navigator.appName.match(/Internet Explorer/)) {
	fsel = document.createElement(\'&#60;SELECT MULTIPLE&#62;\');
} else {
	fsel = document.createElement(\'select\');
	fsel.multiple = true;
}
]]></description>
			<content:encoded><![CDATA[<p>To create a multiple select-box with javascript you need a <em>very</em> ugly hack in IE.</p>
<pre style="font-size: 1.5em">if (navigator.appName.match(/Internet Explorer/)) {
	fsel = document.createElement(\'&lt;SELECT MULTIPLE&gt;\');
} else {
	fsel = document.createElement(\'select\');
	fsel.multiple = true;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2007/09/02/stupid-ie-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
