Ben, thanks a lot for this!
I tried to use cursor.estimatedCount but I am very new to this, so it
is still not working.
Searching the web led me to code by Jeremy Geerdes at
http://groups.google.co.jp/group/Google-AJAX-Search-API/browse_thread/thread/a14cb278eae3699b/b73bb24310f6d3eb
where he suggests the following
function showEstResults(a,b){
if(b.cursor&&b.cursor.pages){
var c;
for(var z=0;z<this.a.length;z++){if(this.a[z].gs==b){c=this.k[z];}}
var
d=document.createElement('div'),e=b.cursor,f=parseInt(e.pages[e.currentPageIndex].start),g=f
+b.results.length,h=e.estimatedResultCount,i="Showing "+f+" - "+g+"
of"+h+" results";
d.className="gsc-resultsCounter";
d.appendChild(document.createTextNode(i));
c.K.insertBefore(d,c.K.childNodes[1]);
}
}
However, the code above did nothing for me. Where can I find more
help?
Thanks again,
Ljuba
On Jul 15, 6:34 pm, Ben Lisbakken <
lisba...@google.com> wrote:
> Ljuba --
>
> If you check out this FAQ:
http://code.google.com/apis/ajaxsearch/faq/#howRetrieve
> You will see how to specify a callback method so that when the search
> returns results, you will have direct access to them in an object. In the
> searcher object upon search completion, there is a value called
> estimatedCount. It is what you need. You can read about it here:
http://code.google.com/apis/ajaxsearch/documentation/reference.html#_...
> (scroll down to GSearch Properties)
>
> Hope that helps,
> Ben
>
> On Tue, Jul 15, 2008 at 8:05 AM, Ljuba <
ljub...@gmail.com> wrote:
>
> > I am trying to use Google-AJAX-Search-API to plug in google search on
> > a web page I'm currently administrating.
>
> > Thanks to a posting in this group, I managed to set the sear
> > restricted to a particular site to show the results in an expanded
> > mode.
>
> > The page where I'm testing this is here
> >
http://www.linguistic-typology.org/test_google.html
>
> > The search results are shown without any counts of the hits. Tthe user
> > does get to such counts as in the line below only if they follow the
> > 'More results" link on the first results page
> > ======
> > Results 1 - 4 of 4 fromwww.linguistic-typology.orgfor ergative.