I'd like to include a search box that automatically appends "site:www.sun.com" for example to the query.
The basic code is:
I'm pretty sure I need another input tag, and I've tried things like:Code:<form action="http://www.google.com/search" method=get> <input name=q size=40 value=""> <input type=submit value="Search" name="submit"> </form>
but nothing has worked.Code:<input type="hidden" name="site:" value="www.sun.com"> or <input type="hidden" name="+" value="www.sun.com"> or <input type="hidden" name="" value="site:www.sun.com">
In the end, the actual URL should be for the user input of "blade":
http://www.google.com/search?q=blade+site%3Awww.sun.com
The blade query comes through fine, but whenever I add the + manually, I get a %2B instead. And it gets tacked on as another query.
Any suggestions?


Reply With Quote