<?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>www.nerdscene.com &#187; Internet Explorer</title>
	<atom:link href="http://www.nerdscene.com/tag/internet-explorer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nerdscene.com</link>
	<description>bitching about everything, one post at a time...</description>
	<lastBuildDate>Tue, 06 Apr 2010 17:40:42 +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>Internet Explorer 7 crashes when trying to submit a form?</title>
		<link>http://www.nerdscene.com/2009/05/05/115/</link>
		<comments>http://www.nerdscene.com/2009/05/05/115/#comments</comments>
		<pubDate>Tue, 05 May 2009 15:39:52 +0000</pubDate>
		<dc:creator>Eli Sand</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MSDN]]></category>

		<guid isPermaLink="false">http://www.nerdscene.com/?p=115</guid>
		<description><![CDATA[As I was testing a recent site I had designed in Internet Explorer for compatibility, I came across one of the forms which was apparently causing Internet Explorer 7 to crash. It put a real damper on the testing since it was causing a crash which I would consider to be pretty heavy on the [...]]]></description>
			<content:encoded><![CDATA[<p>As I was testing a recent site I had designed in Internet Explorer for compatibility, I came across one of the forms which was apparently causing Internet Explorer 7 to crash.  It put a real damper on the testing since it was causing a <em>crash</em> which I would consider to be pretty heavy on the &#8220;must fix&#8221; list before it goes live.  The worst part was, I had done a lot of extensive testing with Firefox which showed no problems, and even Internet Explorer 8 was behaving as expected.  Thankfully I have Internet Explorer 8 which finally has a decent set of developer tools built in, so I set forth to try and figure out what the problem was&#8230; hopefully!</p>
<p>My first thought was that it might be some code I had recently added to a JavaScript file which was responsible for capturing the name/value pair of the submit button pressed when you submit a form (which is the only way to get that information when using AJAX to submit form data).  The code worked great in Firefox, but I hadn&#8217;t tested it yet for Internet Explorer at all, so I changed it around a bit to see if maybe some of that was causing it.  My debugging progressed to completely commenting out that new code, essentially bringing me back to code I knew worked in Internet Explorer 7 before, but it was <em>still</em> crashing!<br />
<span id="more-115"></span><br />
I started to dig a bit deeper and noticed that for some reason if I commented out one of my submit buttons (my form had two buttons with the same name &#8211; used to pick between two choices&#8230; both of which submit the form), it wouldn&#8217;t crash any more &#8211; but it wasn&#8217;t submitting the form via AJAX which it should have been, so there was still a problem somewhere.  Since I was able to get a bit further now that Internet Explorer 7 wasn&#8217;t crashing, I was able to determine that it was choking somewhere in jQuery, at a piece of code that quite simply just tried to toUpperCase() a string &#8211; namely the method of the form (that is, whether it was to be submitted via GET or POST).</p>
<p>I played around a bit and noticed that if I hard coded in (to my JavaScript code that builds the form data to be sent via AJAX) a method of &#8220;post&#8221;, that it worked fine &#8211; it didn&#8217;t like it when I tried to retrieve the method set on the form however.  After a bit more sleuthing, I decided to check up on the getAttribute() DOM function which I used to try and retrieve the form method.  What I found was a piece of gold buried under the usual <a href="http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx" target="_blank">MSDN documentation</a>; someone had posted a comment at the bottom mentioning an obscure bug when using getAttribute on forms&#8230;  At first, I was a bit excited, hoping I had found the problem but I quickly saw that the bug was apparently just mentioning a problem when you used the name &#8220;id&#8221; on an input element which I was not doing in my code.  However, I kept reading the description and noticed there was an additional bit of information stating that the problem was that the name property on an input element could actually override any key word in the DOM, potentially causing odd behaviour.</p>
<p>I quickly skimmed through my form, looking at the inputs and what name I had assigned them, but they were all fine, however the submit buttons were named &#8220;method&#8221; &#8211; which is a DOM property for forms!  The comment quickly made sense and I knew I had found the problem; the submit button was causing a problem when I was trying to get the method property from the form through getAttribute()&#8230; it was clashing with the name property from the submit button because it&#8217;s name was set to &#8220;method&#8221; and this was causing Internet Explorer 7 to crash!</p>
<p>The fix was relatively simple &#8211; I just renamed my submit button to something other than &#8220;method&#8221; and presto, Internet Explorer 7 now worked just fine (and I was able to re-enable my second submit button without any problems too).  Well, I shouldn&#8217;t say <em>fine</em> since I did discover another problem in that Internet Explorer 7 apparently submits the HTML code in between&lt;button&gt;&#8230;&lt;/button&gt; tags instead of the value property defined on the button element, but that was a simple work-around thankfully.</p>
<p>Stupid Internet Explorer <img src='http://www.nerdscene.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdscene.com/2009/05/05/115/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two of the most useful Web Developer sites ever</title>
		<link>http://www.nerdscene.com/2009/04/22/107/</link>
		<comments>http://www.nerdscene.com/2009/04/22/107/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 15:03:37 +0000</pubDate>
		<dc:creator>Eli Sand</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[MSDN Library]]></category>
		<category><![CDATA[web browser]]></category>

		<guid isPermaLink="false">http://www.nerdscene.com/?p=107</guid>
		<description><![CDATA[If you do any sort of Web Development at all and you don&#8217;t know about either of these sites, you&#8217;re severely missing out on one of the Internets most useful resources ever created for Web Development. Sure, there are other sites, even Microsoft&#8217;s MSDN Library which has pretty good documentation on a lot of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you do any sort of Web Development at all and you don&#8217;t know about either of these sites, you&#8217;re severely missing out on one of the Internets most useful resources ever created for Web Development.  Sure, there are other sites, even Microsoft&#8217;s MSDN Library which has pretty good documentation on a lot of the same stuff, but none are as easy to navigate and have as many tips and information about cross-browser application.</p>
<p>I&#8217;m talking of course about Brian Wilson&#8217;s <a title="Index DOT Html" href="http://www.blooberry.com/indexdot/html/index.html" target="_blank">Index DOT Html</a> and <a title="Index DOT Css" href="http://www.blooberry.com/indexdot/css/index.html" target="_blank">Index DOT Css</a> sites.  I have been using these sites over the past 8+ or so years as one of my primary resources when it comes to Web Development.  They document the majority of the HTML and CSS elements and properties, how they work and what browsers support them (and to what degree) &#8211; complete with browser specific tips and notes.<br />
<span id="more-107"></span><br />
The sites may not be up to date with Firefox 3 and Internet Explorer 7 or 8, but the information they provide is still very relevant and still very useful.  They&#8217;re always my first stop when I need to look up a particular HTML element or CSS property, and to be honest I don&#8217;t know where I would turn if they weren&#8217;t around for me to use.  I suppose I owe Brian Wilson an enormous thank you for all his hard work and dedication to the sites, and I&#8217;m pretty sure that there are many others out there who owe the same as well.</p>
<p>Brian, thank you for two of the most useful resources available on the Internet over the past decade or so.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdscene.com/2009/04/22/107/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAX problems with blank responseTexts</title>
		<link>http://www.nerdscene.com/2009/04/21/104/</link>
		<comments>http://www.nerdscene.com/2009/04/21/104/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 16:56:50 +0000</pubDate>
		<dc:creator>Eli Sand</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[readyState]]></category>
		<category><![CDATA[responseText]]></category>
		<category><![CDATA[XMLHttpRequest]]></category>

		<guid isPermaLink="false">http://www.nerdscene.com/?p=104</guid>
		<description><![CDATA[In the middle of developing a web application and doing some routine testing just to make sure my AJAX code was working, I stumbled upon a rather odd and what seemed to be rather random error in Firefox 3. It took some debugging and a bit of speculation to figure out what the problem most [...]]]></description>
			<content:encoded><![CDATA[<p>In the middle of developing a web application and doing some routine testing just to make sure my AJAX code was working, I stumbled upon a rather odd and what seemed to be rather random error in Firefox 3.  It took some debugging and a bit of speculation to figure out what the problem most likely was and how I hoped I fixed it.<br />
<span id="more-104"></span><br />
The problem was with a refresh button I had created, which would submit form data via an AJAX POST call and I would take the responseText I got back and replace a DOM node with a replacement DOM node I got from the AJAX call.  Upon initial testing everything seemed to work fine, but once in a while after hitting the refresh button about 10 or so times, the DOM node I was updating would get erased!  It didn&#8217;t seem to happen in Internet Explorer 8, just Firefox 3 (and Firefox 2 as well).</p>
<p>After doing some initial debugging, it seemed that my responseText was coming back blank &#8211; but Firebug clearly showed that Firefox was getting the full DOM document back from the AJAX POST call, so I knew something was up with how the response was being handled by AJAX.  Now, I use jQuery for the majority of my JavaScript code, so I was a bit surprised to find out that there was an AJAX problem since I figured that a bug like this would have likely at least already been reported.  After a lot of searching on Google however, I only turned up one result that was quite similar to my problem which had no resolution.  So it looked like I would have to solve this one entirely on my own.</p>
<p>I did more debugging, and out of pure luck I ended up noticing that the readyState on my XHR object was set to 0, which means that apparently an AJAX call hadn&#8217;t even been made yet.  I found this rather odd to see a readyState of 0 since clearly an AJAX call <em>had</em> been made (and returned with success).  I thought about the situation a bit and figured that perhaps I should move my debugging call (I was using console.log()) up the chain a bit so I did it as the first call from my AJAX completion callback function.  After doing that I noticed that it was now correctly showing a readyState of 4.  This meant that somewhere down the line, something was happening to my XHR object causing the readyState to be reset&#8230; and possibly resetting my entire XHR object!</p>
<p>Sure enough, I was indeed correct!  The problem was that I was trying to directly access my XHR object from within a jQuery animation callback which obviously uses timers.  Now, here is where I speculate because the problem only happens in Firefox, but I&#8217;m guessing that the XHR object was somehow being reset or altered after some time&#8230; very likely an internal browser cache system that was purging my XHR object.  My solution was to simply copy the responseText to a variable before entering in to any timer based jQuery calls (essentially, I assigned the responseText to a variable as the first call from my completion callback function).  Then, from within my jQuery animation callback I simply referred to the variable I created which had a copy of the responseText.  No more random blank responseTexts!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdscene.com/2009/04/21/104/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-Browser inline-block without word spacing!</title>
		<link>http://www.nerdscene.com/2009/04/20/97/</link>
		<comments>http://www.nerdscene.com/2009/04/20/97/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 20:26:32 +0000</pubDate>
		<dc:creator>Eli Sand</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS hack]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[quirks mode]]></category>

		<guid isPermaLink="false">http://www.nerdscene.com/?p=97</guid>
		<description><![CDATA[If you&#8217;re any sort of respectable web designer, you&#8217;ve obviously come across many situations when you&#8217;ve had to use divs as a sort of inline block and only wished that you could use display: inline-block to quite simply solve all your layout problems.  Instead though, we&#8217;ve had to resort to using float: left and then [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re any sort of respectable web designer, you&#8217;ve obviously come across many situations when you&#8217;ve had to use divs as a sort of inline block and only <em>wished</em> that you could use display: inline-block to quite simply solve all your layout problems.  Instead though, we&#8217;ve had to resort to using float: left and then inserting a float clearing div/br after all those floated divs.  Sure, it works but it&#8217;s not what we really want to end up doing (especially having to throw in extra html markup just for visual correctness).</p>
<p>Well, I&#8217;ve since run in to a situation that using float: left wasn&#8217;t working for me (try centering a set of divs that have float: left &#8211; it&#8217;s a pain!), so I had to find some kind of way to use inline-block.  Thankfully, Internet Explorer 8 and Firefox 3 support inline-block now, but we still have to deal with those hard-headed users that take forever (or never) to upgrade their browsers.  To accomodate Internet Explorer 7 and Firefox 2 we have to use some CSS hacks (what else is new!); thankfully they&#8217;re not that bad (but it still invalidates your CSS&#8230; bummer).<br />
<span id="more-97"></span><br />
First, you must make sure that you do <em>not</em> throw the browser in to quirks mode, otherwise it won&#8217;t work just right.  This means specifying a proper DOCTYPE on your document (and if you&#8217;re using XHTML, don&#8217;t include the &lt;?xml &#8230; ?&gt; tag at the top).  Once you have that out of the way, it&#8217;s just a little bit of CSS to add to the element(s) you want to display as inline-block:</p>
<p><code><br />
display: -moz-inline-box;<br />
display: inline-block;<br />
zoom: 1;<br />
*display: inline;<br />
vertical-align: top;<br />
</code></p>
<p>The first line sets a special Firefox property that we need for Firefox 2.  The second line obviously sets the display to inline-block (and Firefox 2 will ignore this setting since it doesn&#8217;t understand inline-block).  The third sets an IE-only property called zoom to a default 1 (no zoom) which triggers a switch in Internet Explorer 7 to enable hasLayout which allows the divs (which are block elements by default) to inherit inline display features.  The fourth line re-sets the display to inline for Internet Explorer 7 to get the final effect we&#8217;re looking for.  The last line fixes part of the word spacing problem we&#8217;re about to mention below.</p>
<p>As mentioned, there&#8217;s still one small problem which you may notice &#8211; inline items get word spacing applied to them because they&#8217;re now inline elements.  That means that <em>any</em> space between your div tags will show up in your layout (even newlines!).  If you&#8217;re trying to get your div blocks to sit side by side without any spacing, you&#8217;re probably pulling your hair out because of this spacing.  There&#8217;s two fixes for it &#8211; the first is to simply get rid of it, though this usually means killing any readability in your back-end programming (if any is used) and mushing all your HTML code together in to one long line which sucks too.  The second way to fix it is with a bit more CSS around the container in which all these divs are in:</p>
<p><code><br />
word-spacing: -1em;<br />
</code></p>
<p>That line of CSS sets the word-spacing to -1em, which is like doing a backspace of 1 character to get rid of the blank space caused by any white space or newlines between your divs.  The vertical-align: top CSS we already added to the individual divs gets rid of the spacing between the divs above and below, but it doesn&#8217;t fix the spacing to the left or right.  By adding a negative word-spacing, we get rid of the spacing on either side of our divs which gets rid of the last of our problems.</p>
<p>There you have it &#8211; a cross-browser inline-block CSS solution, and even a fix for any erroneous spaces in your HTML markup that you probably won&#8217;t want either.  I haven&#8217;t tested these fixes in Internet Explorer 6 for a few reasons; I refuse to code for Internet Explorer 6 any more since the browser is so old and Internet Explorer 8 is now officially released so users <em>really</em> should upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdscene.com/2009/04/20/97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

