Well, in order to do this, you're not going to need this code on the  
originating page.  Basically, all that you need on the first page is a  
simple html form with its action set to the second page where you want  
to display the results.  Something like this would suffice:

<form action="page2.html" method="get">
  <div>
   <input name="q" type="text"/>
   <input type="submit" value="Search"/>
  </div>
</form>

Then, you have a few options for your second page, depending on how  
you want to run your search. You can run the search server-side; you  
can use the AJAX control with a server-side script (like the code you  
have), but use a line of code server-side to add the appropriate  
execute statement; or you can use a purely Javascript solution.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]

Unless otherwise noted, any price quotes contained within this  
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!

And check out my blog, Adventures in Web Development, at 
http://jgeerdes.blogspot.com 
  !


On Jun 8, 2009, at 12:55 AM, Gaudioso Asejo wrote:

>
>
> 2009/6/5 red <[email protected]>
> Hello!
> I have a problem. I would set Google search form  on all pages on my
> site and when user send search request system show results in new
> page.
> Please, instrust me, what I need add to code on  initialize()
> function.
>
> function initialize() {
>      var searchControl = new google.search.SearchControl();
>        var options = new google.search.SearcherOptions();
>       options.setExpandMode
> (google.search.SearchControl.EXPAND_MODE_OPEN);
>        options.setRoot(document.getElementById("results"));
>        var siteSearch = new google.search.WebSearch();
>        siteSearch.setSiteRestriction("empiresitebuilding.ru");
>        searchControl.addSearcher(siteSearch, options);
>       searchControl.draw(document.getElementById("searchcontrol"));
>       }
>
> Подскажите пожалуйста как решить проблему. Хочу чтобы форма поиска
> была на всех страницах, а результаты поиска выдались на другой. Уже
> неделю голову ломаю. Думаю проблема совсем простая, но никак не могу
> найти нужный метод.
>
>
> >


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