Search Evan’s Blog

Seems like everyone’s doing it, so I suppose I should too.

I’ve added a search option to the blog, using roughly the sample code David Cumps posted a few days ago:

(some folks asked me what “roughly the sample code” means). I actually switched it up to use the site is all. Here’s my modified code — change the stuff in Red for your specific application:

<h3>Search Evan's Blog <img src="" border="0" ALT="MSN Search"/> </h3>
<input class="BlogSearch" type="text" name="searchBox" id="blogSearchTextMSN" value=""
onkeypress="return blogSearchMSN(event, this);">
<input type="button" value="Search" onclick="return blogSearchMSN2('blogSearchTextMSN');" class="BlogSearchButton">
<script type="text/javascript">

function blogSearchMSN(event, oInput) {
  var keyCode = (event) ? event.keyCode : keyStroke.which;
  if (keyCode == 13) {
    top.location = '' + escape(oInput.value) + '';
    return false;
  } return true;

function blogSearchMSN2(oInputId) {
  var oInput = document.getElementById(oInputId);
  top.location = '' + escape(oInput.value) + '';
  return false;

Comments (3)

  1. David Cumps says:

    Other info: I added an important notice to the post about Google terms and rumours about sites being removed from the index, please check it out and decide for yourself 🙂

  2. David Cumps says:

    Oops, I was too fast, apparently you don’t have the Google version :p but it might be worth to check if MSN doesn’t have any of those (annoying) rules

  3. Luc Geurts says:

    Nice coding Evan. I use the Technorati searchlet. Did you try that?

Skip to main content