MSN and Windows Live has got another cool service that you can link into that I've seen on a few sites, a dynamic Live Search box on your web site. It took us only a few minutes to create the one you see below, but we'll see if it works without using a table for layout...
Yes indeed, we can stick it right in the page here, and we can style it so it doesn't need any tables. I wish Microsoft would stop using tables for layout.
So what's wrong with it and why would I have a search in my CMS like PhatCMS does? The first reason is no instant gratification, you have to wait for the search engine to index any new pages before they can be searched on your site. Another is that while these services are usually very fast, they can take longer to return results that an inbuilt search which is searching a much smaller index, just your site.
Some sites are optimised to search indexes of only the site content, and not menus on pages and other links. The best way to demostrate this is that 50 single pages might have a menu item on them, for example this blog page and all the other current ones have links to each other. The search engine would treat each page as a result, and while it should put the one on top that contains the title we are looking for, it can create many results uneccesarily. Using our in built PhatCMS search looking for "MSN Maps" gets 8 results and it is correct, only 8 seperate content items on the site mention MSN maps. Typing "MSN Maps" into the search box above, which only searches our site gets 89 results.
It would be nice if the results didn't have a missing logo image too.
Here's the modified code without using a table for the layout:
<!-- Live Search -->
<meta content="1.1, en-AU" name="Search.WLSearchBox" /></p>
<div id="WLSearchBoxDiv">
<div style="width: 369px">
<div id="WLSearchBoxPlaceholder">
<div style="border-right: #4b7b9f 2px; border-top: #4b7b9f 2px solid; float: left; border-left: #4b7b9f 2px solid; width: 340px; border-bottom: #4b7b9f 2px solid"><input id="WLSearchBoxInput" style="border-right: transparent 0px; padding-right: 0px; background-position: right 50%; border-top: transparent 0px; padding-left: 0px; background-image: url(http://search.live.com//siteowner/s/siteowner/searchbox_background.png); padding-bottom: 0px; border-left: transparent 0px; width: 100%; padding-top: 0px; border-bottom: transparent 0px; background-repeat: no-repeat; height: 18px" disabled="disabled" value="Loading..." type="text" /></div>
<span style="border-right: #4b7b9f 2px solid; border-top: #4b7b9f 2px solid; float: right; border-left: #4b7b9f 2px solid; width: 23px; border-bottom: #4b7b9f 2px solid"><input id="WLSearchBoxButton" style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; border-top-style: none; padding-top: 0px; border-right-style: none; border-left-style: none; border-bottom-style: none" type="image" src="http://search.live.com//siteowner/s/siteowner/searchbutton_normal.png" align="absBottom" /></span></div>
</div>
<script type="text/javascript" charset="utf-8">
var WLSearchBoxConfiguration=
{
"global":{
"serverDNS":"search.live.com",
"market":"en-AU"
},
"appearance":{
"autoHideTopControl":false,
"width":600,
"height":400,
"theme":"Green"
},
"scopes":[
{
"type":"web",
"caption":"CWS Site",
"searchParam":"site:www.customwebsol.com"
}
,
{
"type":"web",
"caption":"Web",
"searchParam":""
}
]
}
</script><script type="text/javascript" charset="utf-8" src="http://search.live.com/bootstrap.js?market=en-AU&ServId=SearchBox&ServId=SearchBoxWeb&Callback=WLSearchBoxScriptReady"></script></div>
<!-- Live Search -->
If you want a dynamic search box on your site you can visit the link on the search results that says Add a search box to your web site and if you like use the sample code above to format it.
We would add a Google one too, but you have to use the API which means getting a key, then you have to sign in to create your custom search engine. MSN Live Search makes it a fair bit easier.