What did you type in the search box in order to get the page
"search.html?search=%D0%BF%D0%BE%D0%B8%D1%81%D0%BA"
The code that Jeremy posted:
<form action="page2.html" method="get">
<div>
<input name="q" type="text"/>
<input type="submit" value="Search"/>
</div>
</form>
This will send you to the page "page2.html" upon clicking search, but
the URL will contain arguments in the form
"?q=whateveritypedinthesearchbox"
Then on your second page you need to have code in place to handle
those arguments and display results accordingly.
I would suggest just using the starting code that google provides to
do this. It can be found in your custom search's control panel. They
are nice simple template pages that do exactly what Jeremy was
starting to explain above. As I recall however when I first tried this
the second page needed the addition of both <html></html> and
<body></body> tags inserted around the code they give you. As a
reference the sample code generated for my search looks like this:
Search Page:
<form action="" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="009470213108363126839:yj1-eqfcpxs" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
********NOTE************
the action="" value needs to include the name of the second page!
Additionally, the value of cx is unique to my search, if you try to
search it now the only thing you'll find is weather data from the
arctic.
So change these values to match your keys, again found in your control
panel, or just use the code template from your control panel.
***************************
Results Page:
<html>
<body>
<div id="cse-search-results"></div>
<script type="text/javascript">
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 600;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
</script>
<script type="text/javascript"
src="http://www.google.com/afsonline/show_afs_search.js"></script>
</html>
</body>
********NOTE************
Notice I added surrounding <html></html> and <body></body> tags. As I
recall I had to do this or my results page was blank.
This page, unlike the Search, is not unique to my search. the template
in your control panel should be identical to mine I believe.
***************************
Hope this helps.
Ben
2009/6/9 red <[email protected]>:
>
> unfortunately, your method don't work. May be reason in this, tag
> "input" in google code have parameter autocomplete="off". See below.
>
> <input type="text" autocomplete="off" size="10" class="gsc-input"
> name="search" title="поиск"/>
>
> In address line may be see
> /search.html?search=%D0%BF%D0%BE%D0%B8%D1%81%D0%BA
>
> but can't see search results. Do you have any solutions yet?
> >
>
--
Bravery is not the lack of fear, but the choice to act in spite of it.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---