I've implemented Adsense for Search on our site, but there is a gap of several lines after the results appear. Is there any way of getting rid of this? I've tried everything. The code given to add to our customised search results page is: <!-- Google Search Result Snippet Begins --> <div id="googleSearchUnitIframe"></div> <script type="text/javascript"> var googleSearchIframeName = 'googleSearchUnitIframe'; var googleSearchFrameWidth = 728; var googleSearchFrameHeight = 0; var googleSearchFrameborder = 0 ; var googleSearchDomain = 'www.google.co.uk'; </script> <script type="text/javascript" src="[URL]http://www.google.com/afsonline/show_afs_search.js[/URL]"> </script> <!-- Google Search Result Snippet Ends --> Code (markup): The Google search box is on the bottom of this page: http://www.UKHotMovies.com/interactive Cheers Just discovered that the webpages shown in the search results are not clickable Any ideas?
the code you puplish HERE is NOT AT ALL the code you actually HAVE on your site.!!! have an exact look at it and you see that you messed around with your code very solidly a normal full G adsense search code has some 40 lines you have 80+ lines it looks like you coppied your code twice - inside each other - but in a messy way, hence only one search box appears. as a result now you have an invald G saearch code. remove all G adsense search code again form your site, then go to your G adsense account and get the original Search code again paste first into a text file to see how it looks if correct, ... then past again into your web site and you have NO gap at all. the current gap ONLY is created by the 2nd G adsense code you have where only ONE set of code belongs. and after all that you may even want to have a look at all the many OTHERT HTML code errors you maintain and carry on so far on that page already see http://validator.w3.org/check?verbose=1&uri=http://www.ukhotmovies.com/interactive/ a code clean up always helps in many ways sooner or later
I don't know what you are talking about. It is the exact code, which you can verify by studying the HTML on this page. As you know, there is one code to add for the search box and another for the search results page. I haven't changed them at all in the manner you are talking about. I haven't changed anything apart from trying to change the FrameHeight to different amounts, but that has made no difference. Can anybody help properly please?
You see the white space because Google site search hard codes the iframe height to 1650. You can check this for yourself by viewing the source of the search results page. I don't think there will be any way to override this as this is generated by Google after you click the search button.
Thanks very much for that. Can't believe Google can be so stupid to hardcode a height of 1650. Can anybody think of a workaround at all? Otherwise will have to implement another script to do site search.
yes you are right i have NOT checked the search code for onsite results yet. nevertheless you have a foreign code snipplet in your search code <font color="black" face="verdana, arial" size="2"><br><br> and still far too many html errors on that page - some of the errors may cause soem bots to choke! re result page be careful to change size - because on a HIGH resolution screen the results are too small for comfortable reading - if i SWITCH the font size (Ctrl + +) one step larger - then the Lycos search box on the result page is already partially covered. the gap ONLY exists if Google has INsufficient number of advertisers above AND/olr below the search results in search results with all Google ad slots filled the results are just ending above the lycos search box. try different keywords then you see - hence Google just has reserved the space it actually uses up if all ads are avaiable.
I had the same problem with the huge gap at the bottom of my search results. But I found a tweak! Instead of picking up your code for the search from AdSense, make a Google CSE (Custom Search Engine, http://www.google.com/cse). You can connect your AdSense account with your the CSE account and still get paid for the clicks. But in addition to allowing you to configure the search in far more detail than with AdSense, the CSE search results page does not have the ugly bug of leaving the huge vertical gap below the results. See how nice mine works now: http://gredic.com/search.html
Idiotic. Confirmed that I get the same big gap although it's periodical. Sometimes it's 1650, other times it's just damn large.
Hey guys, I solved this problem by adding this line to the JS code: var googleSearchPath = "/cse"; The gap is gone. Now I wonder how can I customize fonts, colors, etc... Does anybody know?
These solutions, along with putting var googleSearchResizeIframe = true; work in FF and IE but not Safari, any ideas on Safari? =D Mark
I tried the var googleSearchResizeIframe = true; code with varying results. Still get the white space in IE6, mozilla, Opera 9. Works fine in IE7 and FF.