<?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>PixelMEDIA &#187; webdev</title>
	<atom:link href="http://www.pixelmedia.com/blog/tag/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixelmedia.com/blog</link>
	<description>The official staff chatter blox</description>
	<lastBuildDate>Thu, 22 Dec 2011 15:55:43 +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>The end of IE6? It’s time to upgrade your browser</title>
		<link>http://www.pixelmedia.com/blog/the-end-of-ie6-its-time-to-upgrade-your-browser/</link>
		<comments>http://www.pixelmedia.com/blog/the-end-of-ie6-its-time-to-upgrade-your-browser/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 15:23:58 +0000</pubDate>
		<pxlAuthorId>32</pxlAuthorId>
		<dc:creator>Patricia Powers</dc:creator>
				<category><![CDATA[Application development]]></category>
		<category><![CDATA[Website design]]></category>
		<category><![CDATA[browers]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.pixelmedia.com/blog/?p=1180</guid>
		<description><![CDATA[Will 2010 finally be the year that Internet Explorer 6 (IE6) loses enough market share that developers no longer need to support it?  I know I speak for not only myself but for many of my developer colleagues when I &#8230; <a href="http://www.pixelmedia.com/blog/the-end-of-ie6-its-time-to-upgrade-your-browser/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Will 2010 finally be the year that Internet Explorer 6 (IE6) loses enough market share that developers no longer need to support it?  I know I speak for not only myself but for many of my developer colleagues when I say, “one can hope!”  IE6 will be 9 years old this year and yet there is still a column for it on our QA checklist.   Windows has come out with two newer (and better) browsers within the last 9 years that we also support; yet developers typically code for the most recent version of Firefox, Chrome, Safari and Opera.  So why do we need to support a version of IE that in today’s technology space is equivalent to a fossil?<span id="more-1180"></span></p>
<p>It’s simple.  People are still using it. Even though the market share is declining, at <a href="http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2" target="_blank">last look</a> IE6 still makes up about 20% of the market.  Buy why?  To compare a modern browser to IE6 would be like comparing a Corvette to a horse and buggy.  It lacks the bells and whistles of the newer browsers, it’s less secure, it doesn’t support png transparancy and it doesn’t support today’s web standards &#8211; which causes developers everywhere hours of frustration.</p>
<p>Ultimately, having to support IE6 is hindering the advancement of websites both in design and functionality.  With the release of HTML5 on the horizon, the web is about to take on a whole new direction and will leave those that don’t support it in the dust.  IE6 users will start to notice sites that look broken or simply do not work.  They will get messages asking them to upgrade (if they haven’t already.)  Even bigger sites like Facebook, YouTube and Digg are starting to limit their support of the browser.</p>
<p>So, my question to you is do you use IE6?  If so, why?  Is it a choice? Are you restricted by your IT department?  Did you just not know there was a difference between browsers, or that there are better ones out there?  Have you noticed sites are prompting you to upgrade, look broken or just don’t work?  Please, leave your answers in the comments.  I’d love to hear from you!</p>
<p>If you are looking for an upgrade try one of these:</p>
<ul>
<li><a href="http://www.mozilla.com/en-US/firefox/upgrade.html" target="_blank">Firefox 3.5</a></li>
<li><a href="http://www.google.com/chrome" target="_blank">Google Chrome</a></li>
<li><a href="http://www.microsoft.com/nz/windows/internet-explorer/default.aspx" target="_blank">Internet Explorer 8</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelmedia.com/blog/the-end-of-ie6-its-time-to-upgrade-your-browser/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Small Victories Can Add Up to Customer Loyalty</title>
		<link>http://www.pixelmedia.com/blog/small-victories/</link>
		<comments>http://www.pixelmedia.com/blog/small-victories/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 15:20:06 +0000</pubDate>
		<pxlAuthorId>29</pxlAuthorId>
		<dc:creator>Kristin Anderson</dc:creator>
				<category><![CDATA[Hosting and support]]></category>
		<category><![CDATA[Content strategy]]></category>
		<category><![CDATA[Customer Service]]></category>
		<category><![CDATA[Experience Design]]></category>
		<category><![CDATA[Information Architecture]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[Website design]]></category>

		<guid isPermaLink="false">http://www.pixelmedia.com/blog/?p=1117</guid>
		<description><![CDATA[The goal of any good web firm should be to provide clients with the best possible online face to the world.  Notice, however, that I use the term “best possible”.  The reality is that we as developers, designers, information architects, &#8230; <a href="http://www.pixelmedia.com/blog/small-victories/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The goal of any good web firm should be to provide clients with the best possible online face to the world.  Notice, however, that I use the term “best possible”.  The reality is that we as developers, designers, information architects, content strategists, account managers and project managers, are often limited by the budget, particularly in this difficult economy.  While a $100,000 website redesign might be off the table during tough times, “small victories” in key places can happen as part of the regular support and maintenance of your website, and often have a big impact.</p>
<p><span id="more-1117"></span></p>
<p>In the support &amp; maintenance division, edits are often purely functional and extremely urgent.  One thing I try to do with my clients is suggest small improvements above and beyond the standard maintenance requests, and emphasize how easy it is to keep the request affordable.  Almost everyone wants to “do it right,” but clients often have a boss ready to veto 30 hours to redesign and rebuild the entire products section.  However, customers may not realize that significant improvements can be made despite limited time and budget:</p>
<ul>
<li>1-2 hours for an information architect look at a problematic page that frequently elicit customer complaints</li>
<li>½ hour for a copywriter to punch up the language on a flat homepage promotion</li>
<li>2-3 hours for a designer to restyle a confusing chart so that users can get critical product information “at a glance”</li>
<li>3-4 hours for a developer to automate a task that normally takes the client 1-2 hours to accomplish using a content management system (CMS) several times weekly</li>
<li>15 minutes to create a Google Analytics account and add the code to a landing page to make sure a search engine optimization (SEO) campaign is effective</li>
</ul>
<p>Affordable suggestions like these introduce clients to expertise that normally only get tapped during large-scale projects. They also remind them that we really do have their best interest in mind and that we are as frustrated by the “bubble gum and duct tape” add-ons to their website as they are. It’s important for everyone to remember that while a full-scale website redesign might not be possible during tough times, these “small victories” in key places (i.e., where customers often identify difficulty) can happen on a regular basis, and often have a big impact. The focus and frequency of these changes can draw attention to improvements that might have otherwise gotten lost during an overwhelming, large-scale redesign, and show users that your company strives to be responsive.  Innovation, intelligence, and creativity in small doses can still be enough to inspire customer involvement and loyalty.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelmedia.com/blog/small-victories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Binding a click event inside a click event with jQuery</title>
		<link>http://www.pixelmedia.com/blog/binding-a-click-event-inside-a-click-event-with-jquery/</link>
		<comments>http://www.pixelmedia.com/blog/binding-a-click-event-inside-a-click-event-with-jquery/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 15:47:37 +0000</pubDate>
		<pxlAuthorId>21</pxlAuthorId>
		<dc:creator>Jeff L</dc:creator>
				<category><![CDATA[Application development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.pixelmedia.com/?p=457</guid>
		<description><![CDATA[I was recently working on coding a design that included a simple type of faux select element. It was basically an unordered list that expanded and collapsed when you clicked a link. As it was styled similar to a select &#8230; <a href="http://www.pixelmedia.com/blog/binding-a-click-event-inside-a-click-event-with-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was recently working on coding a design that included a simple type of faux select element. It was basically an unordered list that expanded and collapsed when you clicked a link. As it was styled similar to a select element, the JavaScript behaviors were similar as well. Clicking the link expanded the list underneath it, and you could then choose a link inside the list and navigate away from the page, or click the original link to close the list again.</p>
<p>The client, however, found this a bit confusing<span id="more-457"></span>—once they had expanded the hidden list, it wasn&#8217;t obvious to them how to close it. They wanted to be able to click somewhere else on the page and have the list close so they could continue browsing. No problem, I figured, a few JavaScript tweaks and we&#8217;d be all set. Simply putting a click event on the body element to close the list would be pretty straightforward.</p>
<p>Lets take a look at the code we used:<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> initFauxSelect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a.showSelect'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      e.<span style="color: #660066;">preventDefault</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> $theList <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.fauxSelect'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.selectList'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      hideShow<span style="color: #009900;">&#40;</span>$theList<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> hideShow<span style="color: #009900;">&#40;</span>obj<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $theList <span style="color: #339933;">=</span> obj<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$theList.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':visible'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $theList.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</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;">else</span> <span style="color: #009900;">&#123;</span>
    $theList.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p></code></p>
<p>It&#8217;s a simple click event on <code>a.showSelect</code> that calls the <code>hideShow()</code> function. If the list is visible, hide it, otherwise show it.</p>
<p>I figured it would be as simple as binding a new click event to the <code>body</code> tag whenever we show the list. The new event would hide the list when someone clicked elsewhere on the page. Let&#8217;s look at the updated <code>hideShow()</code> code:</p>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> hideShow<span style="color: #009900;">&#40;</span>obj<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $theList <span style="color: #339933;">=</span> obj<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$theList.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':visible'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $theList.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">unbind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click.fauxselect'</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;">else</span> <span style="color: #009900;">&#123;</span>
    $theList.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click.fauxselect'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      $theList.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">unbind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click.fauxselect'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p></code></p>
<p>Now, whenever we&#8217;re showing the list, we&#8217;re creating a new click event on the <code>body</code> that hides the list. It also unbinds itself once its job is done. If someone closes the list by clicking <code>a.showSelect</code> again, we also unbind the event just to keep things clean.</p>
<p>However, I ran into a problem. The event I was binding to the body was being called right away, which stopped the list from ever appearing! It seemed a bit strange, as my assumption was that you&#8217;d never want your new event to fire as the same time as the current event.</p>
<p>Thankfully, there&#8217;s an easy way prevent this from happening. In our original click event on the <code>.showSelect</code> element, we need to stop that event from bubbling up the DOM.</p>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> initShortcutsSelect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a.showSelect'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    e.<span style="color: #660066;">stopPropagation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">// ----- ADDED THIS LINE</span>
    <span style="color: #003366; font-weight: bold;">var</span> $theList <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.fauxSelect'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.selectList'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    hideShow<span style="color: #009900;">&#40;</span>$theList<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p></code></p>
<p>By telling the event to stopPropagation, it never bubbles up the DOM, never reaches the <code>body</code> and never calls the new click event you bound there until the user actually clicks the body.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelmedia.com/blog/binding-a-click-event-inside-a-click-event-with-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dynamically setting the height of an iframe</title>
		<link>http://www.pixelmedia.com/blog/dynamic-iframe-height/</link>
		<comments>http://www.pixelmedia.com/blog/dynamic-iframe-height/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 18:41:36 +0000</pubDate>
		<pxlAuthorId>21</pxlAuthorId>
		<dc:creator>Jeff L</dc:creator>
				<category><![CDATA[Application development]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.pixelmedia.com/?p=181</guid>
		<description><![CDATA[Recently, we had a situation that required us to pull in some content from one server to another using an iframe. Generally, this is something we would try to avoid, but we needed to pull some data from a new &#8230; <a href="http://www.pixelmedia.com/blog/dynamic-iframe-height/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently, we had a situation that required us to pull in some content from one server to another using an iframe. Generally, this is something we would try to avoid, but we needed to pull some data from a new .NET application into a legacy ColdFusion application.</p>
<p>Unfortunately, the height of the page being pulled in would vary wildly. This led to a fairly disappointing experience where the page was either far too long, or content in the iframe was cut off and the user had to scroll within the iframe to see everything.</p>
<p>We came up with what we thought might be an interesting solution. If the page loading inside of the iframe (the child page) could calculate its height, and somehow let the parent page know, the parent page should be able to reset the height of the iframe.</p>
<p><span id="more-181"></span></p>
<p>With a little <a href="http://tagneto.blogspot.com/2006/10/ie-7-and-iframe-apis-part-2.html?showComment=1163531700000#c116353170380763551" target="_blank">inspiration</a>, we came up with a pretty neat solution that we&#8217;d like to share. Our solution requires that you have the ability to edit the code of both the parent and child pages.</p>
<p>The child page being loaded into the iframe will simply reset the location of the parent page, and include a hash with the height of itself.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">var</span> parentUrl <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://example/iframe-outside.html&quot;</span><span style="color: #339933;">;</span>
setHash <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    parent.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> parentUrl <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;#&quot;</span> <span style="color: #339933;">+</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>We&#8217;re using <a href="http://jquery.com/" target="_blank">jQuery </a>here to easily get the height of the &lt;body&gt; tag.</p>
<p>On the parent page that includes the iframe, we&#8217;ll again use jQuery and write a small function that gets the height from the hash in the URL, and uses that to reset the height of the iframe.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>8
9
10
11
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> setHeight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> newHeight <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>location.<span style="color: #660066;">hash</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">50</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#hashFrame'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'height'</span><span style="color: #339933;">,</span> newHeight<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>We ran into a bit of an issue: the page we were loading was taking a few seconds to load, and we didn&#8217;t want to set our height on the iframe until the content within the iframe had finished loading (and it had a chance to set the proper height to the url hash).</p>
<p>More jQuery to the rescue! The jQuery .load() method allowed us to call our setHeight() function after the iframe had finished loading.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>12
13
14
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#hashFrame'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    setHeight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Putting it all together gave us a great way to use our new application inside our legacy application, and make it faily seamless to the end user.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelmedia.com/blog/dynamic-iframe-height/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

