A couple of months back , I wrote a post entitled Creating custom search boxes for library use. This is one of my top 10 most popular blog posts and also one of the posts which I’m most proud of because it is one of my few posts that I feel is pretty original.
In that post, I figured out a way to create search widgets/boxes for practically any database, which can be embedded in many places including subject guides.
However since then, circumstances have conspired to make the post a little out-dated
Firstly the example given on Scopus, no longer works as Scopus changed their urls. That of course is easily fixed. Secondly, I figured out a slightly better way to improve the stability of the widget.
A more stable search widget?
You can read through the original post again on how to create a custom search-box for EconLit (via OVIDSP). At the risk of quoting myself
“I have being a big fan of Opensearch plugins since I discovered them and I even created a big bunch of them here for almost every database we support on various platforms.
Once you have created a opensearch plugin, you know exactly what format the url should be sent to get the result. For instance, I know that to send a keyword query to EconLit (OvidSP) with the term TEST, you should send the following string.
The slight improvement to this would be to send the following string instead,
Both methods should work, but I’m told that the later string would avoid caching problems.
So the rest follows as before and so the final code you should use is as follows
var searchInputeconlit = document.getElementById(“econlitSearchInput”);
window.open(url + encodeURIComponent(searchInputeconlit.value) + url2);
<div id=”enterText” style=”position: absolute; left: -1000em; width: 20em;”>Enter your search terms:</div>