OT: Adding "kubuntu-users mailing list" to a search box

Paul Rumelhart godshatter at yahoo.com
Fri Feb 27 17:51:18 GMT 2009


Nigel Ridley wrote:
> I'm still playing with my 'home' page for Firefox and thought that it would be a good idea to be 
> able to add "kubuntu-users mailing list" to the search box below so that I could just type in my 
> search word/phrase and get results just from the kubuntu-users mailing list.
>
> Any ideas how to implement it? I did try a few experiments but nothing worked so far :-(
>
> [code]
>
> <form action="http://www.google.com/search" method="get" id="google_general">
> <p>
> <input type="text"   name="q" size="31" maxlength="256" id="google_general-input" />
> <input type="submit" value="Search" />
> </p>
> </form>
>
> [code]
>
> Blessings,
>
> Nigel
>   


It looks like the site:ubuntu.com (or whatever site you want to put 
there) is treated as part of the value for "q" when you run a google 
search.  So you'll probably need to do some javascript to prepend 
"site:blah+" to the value of the "q" text box.  You should be able to 
put an on-submit trigger on the form.  I'd put a name on the form and 
access the value using something like 
"document.form.myformname.q.value".  It's been a while since I've done 
javascript, though, so my syntax might be off.

Paul




More information about the kubuntu-users mailing list