Archive for March, 2010

Triggering events in parent document within iFrame

Consider a situation where you have an iFrame on a page. Suppose you have an element outside of the iFrame (in the parent document) that you wish to target with some jQuery from within the iFrame. This situation may sound odd, but it has come up multiple times.

The method by which I target elements in the parent document is quite straightforward:

$(window.parent.document).find('some.selector');

This simply gets the parent document and uses find to get whatever page element you are after. Quite obvious when you see it, but it can be elusive in the moment.

Display 404 page when argument has no results

Recently, I encountered an issue with Drupal Views. I have a view setup to display a list of results when given a name of a taxonomy term. For instance, /viewpath/taxonomy-term returns all nodes that have ‘taxonomy-term’ in their list of associated terms.

The problem is, if you give it a non-existent term as an argument, the default behavior is to simply display a blank page. Not a good experience or SEO practice. More

How many H1 tags per page? One per page

I recently searched for the answer to the question of how and why do you use H1 tags on a page. I’ve long understood that you only use one single H1 tag per page, but I was surprised that even google’s top result for the query doesn’t actually use the H1 anywhere on the page.

For simplicity sake on this blog, I use an H1 tag at the top for my name and H2 tags for posts. On single post pages and content pages, the H1 tag is used for their title and my name switches to an H2 (I rank for Austin Marron no matter what). More

Some reasons I do not like ExpressionEngine

For several months, I fought with ExpressionEngine when working with IntuitLabs. Now that the redesign and platform migration is nearing completion (image updates to come once it is made public), I suppose I’ll spend some time discussing why I decided to move. More