<?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>Alex's  Rocket</title>
	<atom:link href="http://klalex.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://klalex.com</link>
	<description>Developing web applications, startups, technologies</description>
	<lastBuildDate>Tue, 21 Jun 2011 13:45:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Bug with Broken Ordered list in IE9</title>
		<link>http://klalex.com/2011/06/broken-ordered-list-in-ie9/</link>
		<comments>http://klalex.com/2011/06/broken-ordered-list-in-ie9/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 12:19:31 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[IE9]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[hide]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[ol]]></category>
		<category><![CDATA[ordered list]]></category>
		<category><![CDATA[show]]></category>
		<category><![CDATA[zero]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=105</guid>
		<description><![CDATA[Recently I&#8217;ve been working with ordered lists. And found strange behavior in IE9 when one ordered list is hiding and new one is showing &#8211; instead of usual order 1,2,3.. it showed all zeros. And it actually doesn&#8217;t matter what list style type you choose &#8211; decimal, lower alpha or other. Let me show you [...]]]></description>
			<content:encoded><![CDATA[<p><P>Recently I&#8217;ve been working with ordered lists. And found strange behavior in IE9 when one ordered list is hiding and new one is showing &#8211; instead of usual order 1,2,3.. it showed all zeros. And it actually doesn&#8217;t matter what list style type you choose &#8211; decimal, lower alpha or other.</p>
<p>Let me show you an example in case you do not have the same problem as well on your project:</p>
<div class="codesnip-container" >
<div class="html4strict codesnip" style="font-family:monospace;"><span class="sc2">&lt;<a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span>&gt;</span><br />
window.onload = function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;lnk-one&#8217;).onclick = function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;two&#8217;).style.display = &#8216;none&#8217;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;one&#8217;).style.display = &#8216;block&#8217;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;lnk-two&#8217;).onclick = function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;one&#8217;).style.display = &#8216;none&#8217;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;two&#8217;).style.display = &#8216;block&#8217;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
}<br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;#&quot;</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;lnk-one&quot;</span>&gt;</span>One<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a>&gt;</span> <span class="sc2">&lt;<a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;#&quot;</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;lnk-two&quot;</span>&gt;</span>Two<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;one&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/ol.html"><span class="kw2">ol</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>one<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>two<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/ol.html"><span class="kw2">ol</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;two&quot;</span> <span class="kw3">style</span><span class="sy0">=</span><span class="st0">&quot;display:none&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/ol.html"><span class="kw2">ol</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>three<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>four<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/ol.html"><span class="kw2">ol</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span></div>
</div>
<p>If you open this HTML in IE9 and then click at first on &#8220;Two&#8221; link and then &#8220;One&#8221; you will see the issue:</p>
<p><img alt="" src="http://www.klalex.com/wp-content/uploads/ordered_list_ie9.png" title="Ordered Lists in IE9 issue" class="aligncenter" width="175" height="144" /></p>
<p>Looks like order breaks in IE9 when one order is hidding then appears new one and then previous one is showing again. To quickly fix you need to place empty element say &lt;div&gt; in the end of the body and when you show ordered list just assing space to this element inner html. Here you are previous html page fixed:</p>
<div class="codesnip-container" >
<div class="html4strict codesnip" style="font-family:monospace;"><span class="sc2">&lt;<a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span>&gt;</span><br />
window.onload = function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;lnk-one&#8217;).onclick = function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;two&#8217;).style.display = &#8216;none&#8217;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;one&#8217;).style.display = &#8216;block&#8217;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;empty&#8217;).innerHTML = &#8216; &#8216;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;lnk-two&#8217;).onclick = function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;one&#8217;).style.display = &#8216;none&#8217;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;two&#8217;).style.display = &#8216;block&#8217;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;empty&#8217;).innerHTML = &#8216; &#8216;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
}<br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;#&quot;</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;lnk-one&quot;</span>&gt;</span>One<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a>&gt;</span> <span class="sc2">&lt;<a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;#&quot;</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;lnk-two&quot;</span>&gt;</span>Two<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;one&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/ol.html"><span class="kw2">ol</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>one<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>two<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/ol.html"><span class="kw2">ol</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;two&quot;</span> <span class="kw3">style</span><span class="sy0">=</span><span class="st0">&quot;display:none&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/ol.html"><span class="kw2">ol</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>three<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>four<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/ol.html"><span class="kw2">ol</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;empty&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span></div>
</div>
<p>It&#8217;s important to place empty &lt;div&gt; after ordered lists. If you place it before &#8211; it won&#8217;t work.</p>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2011/06/broken-ordered-list-in-ie9/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OpenInviter and UTF8 encoding</title>
		<link>http://klalex.com/2011/01/openinviter-and-russian-names/</link>
		<comments>http://klalex.com/2011/01/openinviter-and-russian-names/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 20:29:17 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[import contacts]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[openinviter]]></category>
		<category><![CDATA[russian]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=97</guid>
		<description><![CDATA[If you need to import contacts from other services there is quite good cheap solution for PHP &#8211; open source library www.openinviter.net. It supports a huge amount of services and that&#8217;s awesome. There is nice auto-installer and documentation. Here I just want to discuss an issue that you can experience &#8211; incorrect encoding of russian [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to import contacts from other services there is quite good cheap solution for PHP &#8211; open source library <a href="http://www.openinviter.net" target="_blank">www.openinviter.net</a>. It supports a huge amount of services and that&#8217;s awesome.</p>
<p>There is nice auto-installer and documentation. Here I just want to discuss an issue that you can experience &#8211; incorrect encoding of russian contact names.</p>
<p>To solve it replace in OpenInviter base class the following line:</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="re0">$name</span><span class="sy0">=</span><a href="http://www.php.net/trim"><span class="kw3">trim</span></a><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="sy0">!</span><a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;first_name&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>?<span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;first_name&#8217;</span><span class="br0">&#93;</span><span class="sy0">:</span><span class="kw4">false</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">&#8216; &#8216;</span><span class="sy0">.</span><span class="br0">&#40;</span><span class="sy0">!</span><a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;middle_name&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>?<span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;middle_name&#8217;</span><span class="br0">&#93;</span><span class="sy0">:</span><span class="kw4">false</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">&#8216; &#8216;</span><span class="sy0">.</span><span class="br0">&#40;</span><span class="sy0">!</span><a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;last_name&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>?<span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;last_name&#8217;</span><span class="br0">&#93;</span><span class="sy0">:</span><span class="kw4">false</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">&#8216; &#8216;</span><span class="sy0">.</span><span class="br0">&#40;</span><span class="sy0">!</span><a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;nickname&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>?<span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;nickname&#8217;</span><span class="br0">&#93;</span><span class="sy0">:</span><span class="kw4">false</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>with</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="re0">$name</span><span class="sy0">=</span><a href="http://www.php.net/utf8_decode"><span class="kw3">utf8_decode</span></a><span class="br0">&#40;</span><a href="http://www.php.net/trim"><span class="kw3">trim</span></a><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="sy0">!</span><a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;first_name&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>?<span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;first_name&#8217;</span><span class="br0">&#93;</span><span class="sy0">:</span><span class="kw4">false</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">&#8216; &#8216;</span><span class="sy0">.</span><span class="br0">&#40;</span><span class="sy0">!</span><a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;middle_name&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>?<span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;middle_name&#8217;</span><span class="br0">&#93;</span><span class="sy0">:</span><span class="kw4">false</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">&#8216; &#8216;</span><span class="sy0">.</span><span class="br0">&#40;</span><span class="sy0">!</span><a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;last_name&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>?<span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;last_name&#8217;</span><span class="br0">&#93;</span><span class="sy0">:</span><span class="kw4">false</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">&#8216; &#8216;</span><span class="sy0">.</span><span class="br0">&#40;</span><span class="sy0">!</span><a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;nickname&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>?<span class="re0">$arrayImport</span><span class="br0">&#91;</span><span class="st_h">&#8216;nickname&#8217;</span><span class="br0">&#93;</span><span class="sy0">:</span><span class="kw4">false</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2011/01/openinviter-and-russian-names/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The array declaration difference between Firefox and IE JavaScript interpreter</title>
		<link>http://klalex.com/2010/05/the-array-declaration-difference-between-firefox-and-ie-javascript-interpreter/</link>
		<comments>http://klalex.com/2010/05/the-array-declaration-difference-between-firefox-and-ie-javascript-interpreter/#comments</comments>
		<pubDate>Fri, 21 May 2010 12:18:02 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=91</guid>
		<description><![CDATA[Found interesting difference in array declaration between FF and IE. For example, if leave comma (,) after all elements in array there will be different size of array as a result: var arr = &#91;1,2,3,&#93;; document.write&#40;arr.length&#41;; As a result in Firefox and Safari it will write &#8220;3&#8243; but in IE it will be &#8220;4&#8243;.]]></description>
			<content:encoded><![CDATA[<p>Found interesting difference in array declaration between FF and IE. For example, if leave comma (,) after all elements in array there will be different size of array as a result:</p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;"><span class="kw2">var</span> arr <span class="sy0">=</span> <span class="br0">&#91;</span>1<span class="sy0">,</span>2<span class="sy0">,</span>3<span class="sy0">,</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
document.<span class="kw1">write</span><span class="br0">&#40;</span>arr.<span class="me1">length</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>As a result in Firefox and Safari it will write &#8220;3&#8243; but in IE it will be &#8220;4&#8243;.</p>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2010/05/the-array-declaration-difference-between-firefox-and-ie-javascript-interpreter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2010 Ukraine State Holidays</title>
		<link>http://klalex.com/2010/05/2010-ukraine-state-holidays/</link>
		<comments>http://klalex.com/2010/05/2010-ukraine-state-holidays/#comments</comments>
		<pubDate>Sun, 02 May 2010 12:51:18 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[Projestic]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[state holidays]]></category>
		<category><![CDATA[Ukraine]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=75</guid>
		<description><![CDATA[Always forget to remind clients about state holidays in Ukraine at least one week before. So decided to create the calendar for 2010 which includes all state holidays in Ukraine. Those days the Projestic team will be out of the office. If you work with development centers in Ukraine find attached calendar file. 2010 Ukraine [...]]]></description>
			<content:encoded><![CDATA[<p>Always forget to remind clients about state holidays in Ukraine at least one week before. So decided to create the calendar for 2010 which includes all state holidays in Ukraine. Those days the Projestic team will be out of the office. If you work with development centers in Ukraine find attached calendar file.</p>
<p><a href="http://www.projestic.com/Ukraine State Holidays 2010.ics">2010 Ukraine State Holidays</a></p>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2010/05/2010-ukraine-state-holidays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using arrays in form element names</title>
		<link>http://klalex.com/2009/07/using-arrays-in-form-element-names/</link>
		<comments>http://klalex.com/2009/07/using-arrays-in-form-element-names/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 13:08:35 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[form elements]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=68</guid>
		<description><![CDATA[Sometimes there is variable number of similar elements on a form. For example, phone numbers. To iterate all filled values on the server it will be nice to use arrays. And form element naming allow it: &#60;form method=&#34;post&#34;&#62; &#60;input type=&#34;text&#34; name=&#34;phone[0]&#34; /&#62; &#60;input type=&#34;text&#34; name=&#34;phone[1]&#34; /&#62; &#8230; &#60;/form&#62; Using PHP it&#8217;s easy to iterate through [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes there is variable number of similar elements on a form. For example, phone numbers. To iterate all filled values on the server it will be nice to use arrays. And form element naming allow it:</p>
<div class="codesnip-container" >
<div class="html4strict codesnip" style="font-family:monospace;"><span class="sc2">&lt;<a href="http://december.com/html/4/element/form.html"><span class="kw2">form</span></a> <span class="kw3">method</span><span class="sy0">=</span><span class="st0">&quot;post&quot;</span>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/input.html"><span class="kw2">input</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text&quot;</span> <span class="kw3">name</span><span class="sy0">=</span><span class="st0">&quot;phone[0]&quot;</span> <span class="sy0">/</span>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/input.html"><span class="kw2">input</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text&quot;</span> <span class="kw3">name</span><span class="sy0">=</span><span class="st0">&quot;phone[1]&quot;</span> <span class="sy0">/</span>&gt;</span><br />
&#8230;<br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/form.html"><span class="kw2">form</span></a>&gt;</span></div>
</div>
<p>Using PHP it&#8217;s easy to iterate through those values now:</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw1">foreach</span> <span class="br0">&#40;</span><span class="re0">$_POST</span><span class="br0">&#91;</span><span class="st_h">&#8216;phone&#8217;</span><span class="br0">&#93;</span> <span class="kw1">as</span> phone<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
<span class="co1">// do something with phone, save in the database</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>But how to access those values with JavaScript? In case we need to validate required fields, for example. It&#8217;s easy to suppose that document.forms[0].phone[0].value returns value. Actually no. In this case we need to use document.forms[0].elements array and access by key:</p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;"><span class="kw3">alert</span><span class="br0">&#40;</span>document.<span class="me1">forms</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>.<span class="me1">elements</span><span class="br0">&#91;</span><span class="st0">&quot;phone[0]&quot;</span><span class="br0">&#93;</span>.<span class="me1">value</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>Using arrays in form element naming allows us to control the variable number of form elements. For example, we can add link &#8220;Add another phone&#8221; and when user clicks on it add new &lt;input type=&#8221;text&#8221; name=&#8221;phone[2]&#8221; /&gt; field. And we do not need to change anything in PHP code because it will iterate all values that we have passed to the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2009/07/using-arrays-in-form-element-names/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Background music on web site</title>
		<link>http://klalex.com/2009/07/background-music-on-web-site/</link>
		<comments>http://klalex.com/2009/07/background-music-on-web-site/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 14:33:21 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[background music]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=64</guid>
		<description><![CDATA[Just curious do you like to hear music when you open a web site? Some clients I work with still asking me to place background music on their site. It can create some atmosphere when you open site, I agree. But what if people do not like it? It&#8217;s possible that users that come to [...]]]></description>
			<content:encoded><![CDATA[<p>Just curious do you like to hear music when you open a web site? Some clients I work with still asking me to place background music on their site. It can create some atmosphere when you open site, I agree. But what if people do not like it? It&#8217;s possible that users that come to the site are listening music in media player. Then it creates a crazy mix and first second you even do not understand what&#8217;s going on. Especially if you are surfing not one website at once. And many people do it. So I really concerned is it usable to set background music and whether it will attract visitors or just make them do not return back again.</p>
<p>If you decided to place background music you should place Pause/Play buttons at least to give visitors control over the playing.</p>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2009/07/background-music-on-web-site/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery UI: Datepicker for birth date input</title>
		<link>http://klalex.com/2009/07/jquery-ui-datepicker-for-birth-date-input/</link>
		<comments>http://klalex.com/2009/07/jquery-ui-datepicker-for-birth-date-input/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 17:24:20 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[birth date]]></category>
		<category><![CDATA[datepicker]]></category>
		<category><![CDATA[jQuery UI]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=57</guid>
		<description><![CDATA[I decided to use jQuery UI Datepicker control for one of project and faced with the some strange behavior. At first, I decided to find a way to select month and year quickly because switching months with previous button will unhappy every user. So I&#8217;ve added the following options: $&#40;&#8216;#datepicker&#8217;&#41;.datepicker&#40;&#123; &#160; &#160; changeMonth: true, &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to use <a href="http://jqueryui.com/demos/datepicker/">jQuery UI Datepicker control</a> for one of project and faced with the some strange behavior. At first, I decided to find a way to select month and year quickly because switching months with previous button will unhappy every user. So I&#8217;ve added the following options:</p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">&#8216;#datepicker&#8217;</span><span class="br0">&#41;</span>.<span class="me1">datepicker</span><span class="br0">&#40;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; changeMonth<span class="sy0">:</span> <span class="kw2">true</span><span class="sy0">,</span><br />
&nbsp; &nbsp; changeYear<span class="sy0">:</span> <span class="kw2">true</span><br />
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>Well it&#8217;s much better already but here I found that not much years are displayed in the dropdown &#8211; only from 1999 to 2019. I spent about minute to find out that range changes when I select year. So it shows -10 year as down date and +10 years as up value (from client I just got email that he cannot select his birth year so I bet whether this logic of work is useful).</p>
<p>To set fixed range of years in dropdown you need to use yearRange option. For instance, in my case it is:</p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">&#8216;#datepicker&#8217;</span><span class="br0">&#41;</span>.<span class="me1">datepicker</span><span class="br0">&#40;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; changeMonth<span class="sy0">:</span> <span class="kw2">true</span><span class="sy0">,</span><br />
&nbsp; &nbsp; changeYear<span class="sy0">:</span> <span class="kw2">true</span><span class="sy0">,</span><br />
&nbsp; &nbsp; yearRange<span class="sy0">:</span> <span class="st0">&#8217;1910:2000&#8242;</span><br />
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>Another interesting thing is that datepicker doesn&#8217;t allow me to select my birth day :) When I select March 1983 it shows days from 1 to 5 only:</p>
<p><img class="aligncenter size-full wp-image-58" title="picture-1" src="http://klalex.com/wp-content/uploads/2009/07/picture-1.png" alt="picture-1" width="225" height="148" /></p>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2009/07/jquery-ui-datepicker-for-birth-date-input/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Really like this saying</title>
		<link>http://klalex.com/2009/06/really-like-this-saying/</link>
		<comments>http://klalex.com/2009/06/really-like-this-saying/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 20:31:40 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=55</guid>
		<description><![CDATA[&#8220;Everything in the world is now real time. So when a certain type of shoe isn’t selling at your corner shop, it’s not six months before the guy in China finds out. It’s almost instantaneous, thanks to my software.&#8221; by Vivek Ranadive, founder and CEO of Tibco]]></description>
			<content:encoded><![CDATA[<p>&#8220;Everything in the world is now real time. So when a certain type of shoe isn’t selling at your corner shop, it’s not six months before the guy in China finds out. It’s almost instantaneous, thanks to my software.&#8221;</p>
<p>by Vivek Ranadive, founder and CEO of Tibco</p>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2009/06/really-like-this-saying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open link in a new window in XHTML 1.0 Strict</title>
		<link>http://klalex.com/2009/06/open-link-in-a-new-window-in-xhtml-10-strict/</link>
		<comments>http://klalex.com/2009/06/open-link-in-a-new-window-in-xhtml-10-strict/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 21:33:35 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Mac OS]]></category>
		<category><![CDATA[osCommerce]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[new window]]></category>
		<category><![CDATA[target]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=51</guid>
		<description><![CDATA[As you may notice using target=&#8221;_blank&#8221; breaks XHTML 1.0 Stric validation. And here you are a solution with jQuery: Add rel=&#8221;external&#8221; for links that you want to be opened in a new window Include the following jQuery script: $&#40;function&#40;&#41; &#123; &#160; $&#40;&#34;a[rel*='external']&#34;&#41;.click&#40;function&#40;&#41; &#123; &#160; &#160; window.open&#40;$&#40;this&#41;.attr&#40;&#8216;href&#8217;&#41;, &#8216;external&#8217;, &#8221;&#41;; &#160; &#160; return false; &#160; &#125;&#41;; &#125;&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>As you may notice using target=&#8221;_blank&#8221; breaks XHTML 1.0 Stric validation. And here you are a solution with jQuery:</p>
<ol>
<li>Add rel=&#8221;external&#8221; for links that you want to be opened in a new window</li>
<li>Include the following jQuery script:<br/>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; $<span class="br0">&#40;</span><span class="st0">&quot;a[rel*='external']&quot;</span><span class="br0">&#41;</span>.<span class="me1">click</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; window.<span class="kw3">open</span><span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span>.<span class="me1">attr</span><span class="br0">&#40;</span><span class="st0">&#8216;href&#8217;</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="st0">&#8216;external&#8217;</span><span class="sy0">,</span> <span class="st0">&#8221;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">false</span><span class="sy0">;</span><br />
&nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
</li>
</ol>
<p>But I agree that it&#8217;s annoying when link is opening in new tab(window) without your acceptance. Even for external links users can use hot key combination (Command + T in mac os or Ctrl + T in windows) to open a link in new tab. We should give user a choice to decide personally whether he/she wants to open a link in the same window or external. Or at least to notify somehow. Using popup window or even icon near the link that tells user that this link is external.</p>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2009/06/open-link-in-a-new-window-in-xhtml-10-strict/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery tips and tricks: &#8216;Add more&#8217; functionality in a table</title>
		<link>http://klalex.com/2009/06/add-more-functionality-in-table-with-jquery/</link>
		<comments>http://klalex.com/2009/06/add-more-functionality-in-table-with-jquery/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 21:30:39 +0000</pubDate>
		<dc:creator>klalex</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://klalex.com/?p=45</guid>
		<description><![CDATA[Usually we have &#8216;Add more&#8217; link on the forms. For example, on the project I&#8217;m working on right now there is registration form and user with Advanced package can create a few accounts. So we have &#8216;Add more&#8217; link that should add one more row with Name, Email and Password for adding another account. Because [...]]]></description>
			<content:encoded><![CDATA[<p>Usually we have &#8216;Add more&#8217; link on the forms. For example, on the project I&#8217;m working on right now there is registration form and user with Advanced package can create a few accounts. So we have &#8216;Add more&#8217; link that should add one more row with Name, Email and Password for adding another account. Because we use table in HTML for placing data fields, new row will be TR actually. And there is a little trick to add it.</p>
<p>Here you are:</p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; $<span class="br0">&#40;</span><span class="st0">&quot;#add_more&quot;</span><span class="br0">&#41;</span>.<span class="me1">click</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; $<span class="br0">&#40;</span><span class="st0">&quot;form table tr:last&quot;</span><span class="br0">&#41;</span>.<span class="me1">after</span><span class="br0">&#40;</span><span class="st0">&#8216;&lt;tr&gt;&#8230;&lt;/tr&gt;&#8217;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>At first, I add click event handler on &#8216;Add more&#8217; link. In even handler declaration I find the last TR block in the table. Then use after() method to add new TR row.</p>
]]></content:encoded>
			<wfw:commentRss>http://klalex.com/2009/06/add-more-functionality-in-table-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

