This page gives an example of how to get the I'm feeling lucky feature that the Google search engine has with Yahoo! Web search.
Here is the service hosted on this server:
It is very simply achieved using the Yahoo! API and a JSON callback. The implementation is in JavaScript, and the source code is available.
In order to use it in your own page, add the following to the head of your HTML:
<script type="application/javascript" src="http://larve.net/people/hugo/2006/03/takemethere.js"> </script>
and then some HTML such as:
<input id="q" type="text" />
<input type="button" value="Take me there!" onclick="takemethere('q')" />
q here is the ID of an input field whose value you want to use for the search.
Here's an example below. Click on the button to be taken to the site corresponding to the first result from Yahoo! Search:
Enter a few terms:
There is currently an open issue with this code: I haven't figured out how to make the back button work from the site reached back to this page, although I am not sure that it is even possible.