20021110 Sunday November 10, 2002

Add a Google Search to your Site I got the idea from Dave and now I've implemented it on this site. To add one to your site, copy and paste the following code and adjust the site URL accordingly. NOTE: This is the XHTML Strict version, if you want a Transitional version, view source on Dave's site.

<form id="searchForm" method="get" action="http://www.google.com/search"
 style="margin: 0; padding: 0" onsubmit="search()">  
   <input type="text" name="q" size="20" maxlength="255" 
       value="search this site" style="font-size: 11px"
       onfocus="this.value=''"  /> 
   <input type="submit" name="sa" value="go" 
       style="font-size: 11px; padding: 2px; line-height: 1" />
</form>

<script type="text/javascript">
<!--
function search() {
    form = document.getElementById('searchForm');
    form.q.value = form.q.value + " site:www.raibledesigns.com";
    form.submit();
}
//-->
</script>

Posted in Roller at Nov 10 2002, 07:45:42 AM MST Add a Comment

Comments:

Post a Comment:
  • HTML Syntax: Allowed