Here's an easier solution:
searchControl.setSearchStartingCallback(
this,
function(control, searcher, query) {
// ... (use the query argument value) ...
}
);
The setSearchStartingCallback method is documented in the
SearchControl Methods section of the Web Search API Class Reference
(scroll down from here to find it):
http://code.google.com/apis/websearch/docs/reference.html#_method_GSearchControl
Note that the Web Search API has been deprecated. You may want to
consider using Custom Search instead.
For Custom Search, the setSearchStartingCallback method is available
with the Custom Search Element / CustomSearchControl.
http://code.google.com/apis/customsearch/docs/js/cselement-reference.html#setSearchStartingCallback
-- omr
--
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.