I would like to customize my search form. I use the Google search service and bind it to my domain, etc.
I chose the location of the two columns in the control panel, but, nevertheless, I want to do something in the form.
So I tried to put the actionlistener in jQuery on the form, however it does not work.
Then I thought that google, of course, provides something for this. And yes, yes. It is called:
setOnSubmitCallback()
http://code.google.com/apis/websearch/docs/reference.html
Unfortunately I do not understand.
So far I:
google.load('search', '1', {language : 'en', style : google.loader.themes.MINIMALIST}); function initialize() { var searchControl = new google.search.CustomSearchControl('017998360718714977594:j6sbtr-d6x8'); searchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); var options = new google.search.DrawOptions(); options.setSearchFormRoot('cse-search-form'); searchControl.draw('cse', options); } google.setOnLoadCallback(initialize);
So I have two divs: #cse-search-form for the form and #cse for the results
#cse is in another div #searchResults, which is hidden, and here it is:
I want to open #searchResults in a dialog from jQuery UI.
$("#searchResults").dialog( { minWidth: 750, minHeight: 750 } );
This will lead to:
.setOnSubmitCallback(function() { $("#searchResults").dialog( { minWidth: 750, minHeight: 750 } ); } );
So my problem is where and what do I need to set setOnSubmitCallback on?
I cannot put it in google.search.Search or CustomSearchControl, as indicated in the documentation. And I cannot call it in onLoadCallback, so this is very strange for me. Cannt figure out how to do this.
I hope someone has more experience with Google searches and can help me with the solution.
Thank you in advance.