google.search.SearchForm will produce a form exactly like the one that you see on the default search control, demoed in the output frame here:
http://code.google.com/apis/ajax/playground/?exp=search#the_hello_world_of_general_search Note that SearchForm is ONLY the form and branding at the top of the control. In order to do what I think you're wanting to do (which would involve adding a second input/select where the user could specify a category), you're going to need to build your own custom form. This is actually a lot easier than it sounds; simply build the form in HTML. Then use basic Javascript to set up an onsubmit listener on the form which will execute your search. I've put together a quick example that you can glean for principles here: http://savedbythegoog.appspot.com/?id=2c872d874c436efaef6efc365a5263653bf6c6ee Jeremy R. Geerdes Effective website design & development Des Moines, IA For more information or a project quote: http://jgeerdes.home.mchsi.com [email protected] If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church! On Jun 27, 2010, at 10:02 PM, Zach M wrote: > Hey I hope this is the right place to post, it seems close enough to a > forum. I was wondering if there was a sample or resource to help me > making a custom Google web search form (only website results no images/ > videos/maps) I am trying to make a form where you type in the keyword > and then select a category and then add that category onto the keyword > line before the query is executed. I have got the hello world running > but i do not know how to make a custom form like this and how to load > the results from a custom form as this was automatically done with the > basic searchcontrol. > > I have looked at one example but I didnt get much from it as it was > using maps and being a beginner with this API it was confusing. I > have gone through alot of the documentation on my own and found > google.search.SearchForm might be a way but how would i load the > results for this? > > Thanks, > Zach > > -- > You received this message because you are subscribed to the Google Groups > "Google AJAX APIs" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-ajax-search-api?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.
