Skip to main content
Ben Nadel at CFUNITED 2009 (Lansdowne, VA) with: Charlie Arehart
Ben Nadel at CFUNITED 2009 (Lansdowne, VA) with: Charlie Arehart ( @carehart )

Helping Google-Users Find Answers

By on

I am going to be helping Google users find answers on my site. I am working on a page-highlighting DHTML system where certain text nodes can be highlighted (wrapped in span elements) depending on if the user's referring url comes from google with search query params.

The tricky thing here is not using innerHTML. I don't like innerHTML. It makes me feel uncomfortable the same way that Evaluate() in ColdFusion makes me feel uncomfortable. Plus, I don't think it's a supported standard (even though many browsers allow for it). So, instead of that, I have to break text nodes into sepparate nodes and wrap parts of them in span DOM elements.

I have the text search and the tag insertion working on a test case which means pretty soon, you will be seeing some new methods in the DHTML snippets library and some highlighting on your page if you come from Google.

Reader Comments

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel