Google Site Search Results On Your Webpage Unicode Available
- stamjoe
-
- Posts: 228
- Joined: Sat Feb 09, 2008 10:32 am
- Location: GREECE
The code from Google ''Search results code''
Paste this code on http://www.dskaterinis.gr/search_results.html, where you would like your search results to appear.
<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_af ... "></script>
i have to add a HTML box in my web page? In this code do i have to change the Width 600 > 500 ? And what about the Height?
Paste this code on http://www.dskaterinis.gr/search_results.html, where you would like your search results to appear.
<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_af ... "></script>
i have to add a HTML box in my web page? In this code do i have to change the Width 600 > 500 ? And what about the Height?
-
-
- Posts: 129
- Joined: Fri Mar 06, 2009 2:10 am
Hi,
You DO NOT paste any code on the page where the results will display.
The Google Search results extension already has the code to display the results.
1) When you get your search box code off google it asks you for the url of where the results will appear, as that is in the form seach box code you dont specify it again.
Example:
The search box form you have on http://www.dskaterinis.gr/search.html is set to display the results on http://www.dskaterinis.gr/search_results.html (which is correct)
Reason why is because you have specified the url in google like you should.
So your http://www.dskaterinis.gr/search.html page is correct.
Now onto the search_results.html page. Just place the Google Search Results extension on the page. There is NO need to do anything else at all, just place it on the page, you do not need to enter any code etc on the results page as the extension does this for you. Just place on page and upload. Also the minimum width is 600 pixels sorry made a typo in post above.
Regards,
Mathew
You DO NOT paste any code on the page where the results will display.
The Google Search results extension already has the code to display the results.
1) When you get your search box code off google it asks you for the url of where the results will appear, as that is in the form seach box code you dont specify it again.
Example:
The search box form you have on http://www.dskaterinis.gr/search.html is set to display the results on http://www.dskaterinis.gr/search_results.html (which is correct)
Reason why is because you have specified the url in google like you should.
So your http://www.dskaterinis.gr/search.html page is correct.
Now onto the search_results.html page. Just place the Google Search Results extension on the page. There is NO need to do anything else at all, just place it on the page, you do not need to enter any code etc on the results page as the extension does this for you. Just place on page and upload. Also the minimum width is 600 pixels sorry made a typo in post above.
Regards,
Mathew
-
-
- Posts: 129
- Joined: Fri Mar 06, 2009 2:10 am
Ok,
We are getting there
Now you must understand because Google restricts the iframe to a minimum of 600 pixels in width the Google Search Results extension must also be 600 pixels in width.
You webpage is not wide enough for the search results hence why it not showing correctly, the 600 pixel width is needed just for the search results to appear, althou your page is wider than 600 pixels the content area where the Google Search Results extension is placed is not 600 pixels.
Take a look at the image below for explanation. The blue border around the Google Search Result extension has a blue border around it to show you the 600 pixel width of the Google Search Result extension (iframe).

Regards,
Mathew
We are getting there

Now you must understand because Google restricts the iframe to a minimum of 600 pixels in width the Google Search Results extension must also be 600 pixels in width.
You webpage is not wide enough for the search results hence why it not showing correctly, the 600 pixel width is needed just for the search results to appear, althou your page is wider than 600 pixels the content area where the Google Search Results extension is placed is not 600 pixels.
Take a look at the image below for explanation. The blue border around the Google Search Result extension has a blue border around it to show you the 600 pixel width of the Google Search Result extension (iframe).

Regards,
Mathew
-
-
- Posts: 129
- Joined: Fri Mar 06, 2009 2:10 am
Sadly it's a limitation Google has done. On my website as it is dynamic i can override Googles own code with a tiny bit of css so things auto adjust but webpages in web builder are not dynamic so it would not work, hence the only down side is the area where results show has to be 600 pixels wide.stamjoe wrote:You re the best my friend.
I will change the width of the page.
I hope it works
thanks
Joe
I did say to someone else a week ago or so i will change the documentation to see if i can explain it more easily.
I forgot about it so in the next day or so i will update manual to try and be more easy to understand.
Regards,
Mathew
-
-
- Posts: 129
- Joined: Fri Mar 06, 2009 2:10 am
Re: Google Site Search Results On Your Webpage Unicode Avail
Hi,ddlg2007 wrote:Is possible use the search without buton? I wanna use it alone, without button.
You just need to delete the following line that appears in the code that Google gives you:
Code: Select all
<input type="submit" name="sa" value="Search" />
Regards,
Mathew