<?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>Teguh Eko Budiarto &#187; User Interface</title>
	<atom:link href="http://teguheko.echodess.com/category/programming/user-interface/feed/" rel="self" type="application/rss+xml" />
	<link>http://teguheko.echodess.com</link>
	<description>Web Programming and Sharing Experience</description>
	<lastBuildDate>Tue, 23 Aug 2011 03:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Z-Index problem with IE</title>
		<link>http://teguheko.echodess.com/2010/08/z-index-problem-with-ie/</link>
		<comments>http://teguheko.echodess.com/2010/08/z-index-problem-with-ie/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 07:44:56 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=107</guid>
		<description><![CDATA[I spent couple of hours to find the solution of this bug, so I just post it here hope it can help somebody else. Btw, the IE version was 8 in windows XP environment. The problem is introduced here http://www.quirksmode.org/bugreports/archives/2006/01/Explorer_z_index_bug.html and here http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html Some of the solutions proposed are here: http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/ http://systembash.com/content/css-z-index-internet-explorer/ (try to open [...]]]></description>
			<content:encoded><![CDATA[<p>I spent couple of hours to find the solution of this bug, so I just post it here hope it can help somebody else. Btw, the IE version was 8 in windows XP environment.</p>
<p>The problem is introduced here <a href="http://www.quirksmode.org/bugreports/archives/2006/01/Explorer_z_index_bug.html">http://www.quirksmode.org/bugreports/archives/2006/01/Explorer_z_index_bug.html</a></p>
<p>and here<br />
<a href="http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html">http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html</a></p>
<p>Some of the solutions proposed are here:<br />
<a href="http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/"> http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/</a><br />
<a href="http://systembash.com/content/css-z-index-internet-explorer/">http://systembash.com/content/css-z-index-internet-explorer/</a></p>
<p>(try to open those pages in IE and FF / Chrome to compare)</p>
<p>What really worked for me was the combination of two solution above, set position:relative to the containing divs and give each containing div higher value of z-index of the contained one.</p>
<p>Case example :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:5; position:relative&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:4&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:3&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:2; position:relative&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:1&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>For the code above, we should be able to see the div with z-index 3 on top of the divs positioned after it (z-index 2 and 1).</p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2010/08/z-index-problem-with-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery AutoComplete Search per Word</title>
		<link>http://teguheko.echodess.com/2009/09/jquery-autocomplete-search-per-word/</link>
		<comments>http://teguheko.echodess.com/2009/09/jquery-autocomplete-search-per-word/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 08:42:17 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=35</guid>
		<description><![CDATA[I was using JQuery autocomplete from Jörn Zaefferer to finish a small project for Computer Telephony &#8211; IPX PBX user interface. I think this is an awesome plugin ad it is suited very well for my project. For the project, I need the autocomplete to be able to search all data containing words which begins [...]]]></description>
			<content:encoded><![CDATA[<p>I was using JQuery autocomplete from <a href="http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/">Jörn Zaefferer</a> to finish a small project for Computer Telephony &#8211; IPX PBX user interface. I think this is an awesome plugin ad it is suited very well for my project. </p>
<p>For the project, I need the autocomplete to be able to search all data containing words which begins with the text being typed in the input textbox. However, after browsing through the documentation and try the possible combination of <strong>matchContains</strong> and <strong>matchSubset</strong> options of the plugin, it seems that it was not able to do what I want it to do. So, I decided to debug the javascript and go into the code to modify the search algorithm. </p>
<p>When I look into the code, I found this part of code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> matchSubset<span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> sub<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><span style="color: #339933;">!</span>options.<span style="color: #660066;">matchCase</span><span style="color: #009900;">&#41;</span> 
        s <span style="color: #339933;">=</span> s.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> s.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span>sub<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>options.<span style="color: #660066;">matchContains</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;word&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        i <span style="color: #339933;">=</span> s.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">search</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>b&quot;</span> <span style="color: #339933;">+</span> sub.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">==</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> i <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">||</span> options.<span style="color: #660066;">matchContains</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In the fifth line of the function, there is a value check for <strong>matchContains</strong> option which implies that it received &#8220;word&#8221; value besides boolean true or false. The code uses the javascript search function with regex using <strong>\b</strong> tag which means word boundary. This means that it already have the functionality to search for subset contained in each word of the search data.<br />
I immediately changed my code to try to use the option by adding this line:</p>
<p><code>matchContains:"word"</code></p>
<p>So, the whole code to activate the autocomplete textbox is as below:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchInput&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">autocomplete</span><span style="color: #009900;">&#40;</span>json.<span style="color: #660066;">Data</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    cacheLength<span style="color: #339933;">:</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
    delay<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
    formatItem<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> sShow <span style="color: #339933;">=</span> row.<span style="color: #000066;">Name</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; - (&quot;</span> <span style="color: #339933;">+</span> row.<span style="color: #660066;">TypePhone</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;) &quot;</span> <span style="color: #339933;">+</span> row.<span style="color: #660066;">Phone</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> sShow<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    matchContains<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;word&quot;</span><span style="color: #339933;">,</span>
    matchSubset<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    max<span style="color: #339933;">:</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>
    minChars<span style="color: #339933;">:</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
    width<span style="color: #339933;">:</span><span style="color: #CC0000;">285</span><span style="color: #339933;">,</span>
    selectFirst<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    scrollHeight<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;100px&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>After that, I try to find in the author&#8217;s website and <a href="http://docs.jquery.com/Plugins/Autocomplete">JQuery documentation </a>where in the world that option is being documented. At last I found it in the <a href="http://jquery.bassistance.de/autocomplete/changelog.txt">change log</a> for the latest version 1.1 (per this post date). It should be also written in the JQuery plugin documentation, since it is a very useful feature, at least for me at the time <img src='http://teguheko.echodess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I hope the author would update the documentation accordingly soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2009/09/jquery-autocomplete-search-per-word/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

