<?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>Robertdot, A Web Design Blog &#187; Uncategorized</title>
	<atom:link href="http://robertdot.org/topics/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://robertdot.org</link>
	<description>A web design blog for designers that develop or developers that design.</description>
	<lastBuildDate>Fri, 05 Mar 2010 15:59:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Two Odd IE Behaviors</title>
		<link>http://robertdot.org/2009/10/12/two-odd-ie-behaviors/</link>
		<comments>http://robertdot.org/2009/10/12/two-odd-ie-behaviors/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 15:17:12 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://robertdot.org/?p=191</guid>
		<description><![CDATA[
 I noticed two odd Internet Explorer (or IE for short) behaviors while I was working on a beta version of a network tools app my boss wanted.  I also figured out the workaround.

Dynamically Visible DIVs Don&#8217;t Appear

 I used a tab-based navigation for the beta version.  When you click on a tab [...]]]></description>
			<content:encoded><![CDATA[<p>
 I noticed two odd Internet Explorer (or IE for short) behaviors while I was working on a beta version of a <a href="http://inetfor.us/">network tools app</a> my boss wanted.  I also figured out the workaround.
</p>
<h3>Dynamically Visible <code>DIV</code>s Don&#8217;t Appear</h3>
<p>
 I used a tab-based navigation for the beta version.  When you click on a tab (composed of an <code>h2</code> and an <code>a</code>), the corresponding <code>div</code> would appear, hiding all the others.  This was achieved by adding and removing a value in the <code>.className</code>.  In IE, though, the tab would work for two tabs, but would only hide tabs after that.  The new tab wouldn&#8217;t appear.
</p>
<p>
 To make matters worse, if I <code>alert</code>ed something in the loop that set or unset the <code>.className</code>s, it would work.  I tried various things like <code>.display="none"</code> while I was modifying things, then setting it back to <code>block</code> when I was done, but none worked.
</p>
<p>
 The solution turns out to be that you need to remove the container element, then reinsert it.  For example:
</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> tabcont <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tab-container'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	pn <span style="color: #339933;">=</span> tabcont.<span style="color: #660066;">parentNode</span><span style="color: #339933;">,</span>
	ns <span style="color: #339933;">=</span> tabcont.<span style="color: #660066;">nextSibling</span><span style="color: #339933;">;</span>
pn.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>pn.<span style="color: #660066;">removeChild</span><span style="color: #009900;">&#40;</span>tabcont<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> ns<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3><abbr title="Document Object Model">DOM</abbr> Created <code>TABLE</code>s Don&#8217;t Show Content</h3>
<p>
 I also needed to dynamically create tables.  This can be done via straight text with <code>.innerHTML</code> or via the DOM with <code>document.createElement</code> and <code>.appendChild</code>.  In some areas, the <code>table</code>s could use <code>thead</code> because the row headers were on top of the table.  Other times, the <code>th</code> was in the same <code>tr</code> as the <code>td</code> it matches.
</p>
<p>
 In instances where there was a <code>thead</code>, I also created a <code>tbody</code>.  Where there weren&#8217;t, I didn&#8217;t bother because the browser usually figures that stuff out.  IE does not.  So, if you&#8217;re using the DOM method of creating tables, make sure you explicitly use a <code>tbody</code>.
</p>
<p>
 For the record, I was also using a <code>caption</code>.  So, that may have triggered something in IE that wanted an explicit <code>tbody</code>.  If your stuff seems to be working fine without the <code>tbody</code>, it may have more to do with <code>caption</code> being present.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertdot.org/2009/10/12/two-odd-ie-behaviors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Good Design Doesn&#8217;t Just Look Pretty</title>
		<link>http://robertdot.org/2007/09/20/a-good-design-doesnt-just-look-pretty/</link>
		<comments>http://robertdot.org/2007/09/20/a-good-design-doesnt-just-look-pretty/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 09:45:57 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://robertdot.org/2007/09/20/a-good-design-doesnt-just-look-pretty/</guid>
		<description><![CDATA[
 A successful design doesn&#8217;t just look pretty.  It communicates.


 Recently at work, I had to review several websites to determine what category the business falls under.  I found only one that clearly stated what the business did.  All the others were written under the assumption that the reader knew what the [...]]]></description>
			<content:encoded><![CDATA[<p>
 A successful design doesn&#8217;t just look pretty.  It communicates.
</p>
<p>
 Recently at work, I had to review several websites to determine what category the business falls under.  I found only one that clearly stated what the business did.  All the others were written under the assumption that the reader knew what the business did.  Since I had no idea, this was rather irritating.  I came to the conclusion that one of the ugliest sites on my list was the most well designed.
</p>
<p>
 Websites exist to communicate.  A website that doesn&#8217;t communicate is poorly designed.  So, a note to designers, make sure your copy clearly states what the business does on the home page (or something akin to an about us page) so that people that aren&#8217;t familiar with the company know what the company does without having to figure it out.  Otherwise, people might do what I wanted to: close the site after 10 seconds of not seeing a clear description.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertdot.org/2007/09/20/a-good-design-doesnt-just-look-pretty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
