Hey all - I'm trying to attach a search query into the URL of a google
api search I have integrated into the page. The hope is that once a
search has been made, a user would be able to click the 'back' button
to go back to their search query. Currently, if a user clicks the
'back' button, their search has disappeared because the query wasn't
appended into the URL. I'm thinking there has to be a simple way to do
this. Here is the existing code I have for the custom search:

<script src="http://www.google.com/uds/api?
file=uds.js&v=1.0&key=xxxxxxxxx=en"></script>
        <script type="text/javascript">
        /*
        *  How to restrict a search to a specific website.
        */

        google.load('search', '1');
        var searchControl;
        function OnLoad() {


          // Create a search control
          searchControl = new google.search.SearchControl();
                  // Links show in same page
                  searchControl.setLinkTarget(google.search.LINK_TARGET_SELF);


                  // Add in a WebSearch
          var webSearch = new google.search.WebSearch();



          // Set the Search Control to get the most number of results
          searchControl.setResultSetSize
(google.search.Search.SMALL_RESULTSET);

          // Restrict our search to pages from our website
          webSearch.setSiteRestriction('www.the-website.com/');

          // Add the searcher to the SearchControl
          searchControl.addSearcher(webSearch);

          // tell the searcher to draw itself and tell it where to
attach
          searchControl.draw(document.getElementById("content"));

*drawOptions.setDrawMode
(google.search.SearchControl.DRAW_MODE_TABBED);


                        }

                        }
        }

        google.setOnLoadCallback(OnLoad, true);


</script>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to