Yes, this problem is solved.  The exact solution will depend on when  
and how you're loading the different components of the API, but in  
general, you need to include a callback argument.  E.g.:

el.onclick=function(){
  var jsapi = document.createElement('script');
  jsapi.setAttribute('type','text/javascript');
  jsapi.setAttribute('src','http://www.google.com/jsapi?callback=myCallback') 
;
  document.getElementsByTagName('head')[0].appendChild(jsapi);
}
function myCallback(){
  google.load('search','1',{callback:searchAPILoadedCallback});
}
function searchAPILoadedCallback(){
  var sc=new google.search.SearchControl();
  sc.addSearcher(new google.search.WebSearch());
  sc.draw(el);
  sc.execute('abraham lincoln');
}

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 Feb 18, 2009, at 5:14 AM, Alex Gusev wrote:

>
> Hi.
>
> When i do google.load on some event (click for example) it reloads the
> page.
>
> I searched this group for my problem and found a discussion about this
> problem:
> http://groups.google.com/group/Google-AJAX-Search-API/browse_thread/thread/ce02cdaa4cad525c/499b3d1c2f05f768?lnk=gst&q=google.load#499b3d1c2f05f768
>
> I want to ask if this problem solved? If yes, what can be wrong?
>
> Thank you.
>
> >


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