<?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>Tom Greenaway &#187; IE</title>
	<atom:link href="http://www.tomgreenaway.com/tag/ie/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tomgreenaway.com</link>
	<description></description>
	<lastBuildDate>Fri, 11 Feb 2011 09:16:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Tripping up your JavaScript in IE7</title>
		<link>http://www.tomgreenaway.com/2009/02/tripping-up-your-javascript-in-ie7/</link>
		<comments>http://www.tomgreenaway.com/2009/02/tripping-up-your-javascript-in-ie7/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 03:08:47 +0000</pubDate>
		<dc:creator>TCMG</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://tgreenaway.com/?p=254</guid>
		<description><![CDATA[After developing an intensive JavaScript website in Firefox and testing with other browsers, including IE8 in compatibility mode I discovered IE8&#8242;s compatibility mode doesn&#8217;t simulate IE7&#8242;s JS. Hence a JS bug was bringing all of IE7&#8242;s JS processing to a &#8230; <a href="http://www.tomgreenaway.com/2009/02/tripping-up-your-javascript-in-ie7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After developing an intensive JavaScript website in Firefox and testing with other browsers, including IE8 in compatibility mode I discovered IE8&#8242;s compatibility mode doesn&#8217;t simulate IE7&#8242;s JS.</p>
<p>Hence a JS bug was bringing all of IE7&#8242;s JS processing to a halt even on the initial page load.</p>
<p>A first step I recommend is temporarily deactivating any JS compressors you may have enabled as pathing problems can crop up from using them and cause issues for IE7.</p>
<p>Beyond that I discovered the major snag resulted in this error from Visual Studio:</p>
<blockquote><p>Expected identifier, string or number</p></blockquote>
<p>Unfortunately that doesn&#8217;t give too much information but I was discovering it in my callback functions within my jQuery. It turns out IE7 has a particular issue with the syntax of JSON:</p>
<pre>
<pre class="brush: jscript;">
$(&quot;.box&quot;).animate({
    height: &quot;100%&quot;,
    opacity: &quot;1.0&quot;,
  }, 600, function() {
    alert(&quot;test!&quot;);
});
</pre>
</pre>
<p>While the above appears to be valid there is a deceptively simple issue that IE7 chokes on. The comma on the end of the third line. While most browsers recognise the empty slot after the opacity variable of the JSON array being passed into the animate function &#8211; IE7 gets really confused and starts complaining about the next semi-colon in your code (in this case part of the callback function).</p>
<p>Just an interesting issue that other browsers don&#8217;t care about but IE7 is really bamboozled by <img src='http://www.tomgreenaway.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomgreenaway.com/2009/02/tripping-up-your-javascript-in-ie7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

