Yep. global declaration works now fine. thx you and nice weekend ;-)
On 12 Jul., 02:51, Ben Lisbakken <
lisba...@google.com> wrote:
> Your searchControl is in the scope of OnLoad, it is not in the global
> scope. When your anchor tag gets clicked, it will be looking for
> searchControl in the global scope. Try changing these lines:
>
> function OnLoad() {
> var controlRoot = document.getElementById("searchResults");
> // Create a search control
> var searchControl = new GSearchControl();
>
> to this:
>
> var searchControl;
> functionOnLoad(){
> var controlRoot = document.getElementById("searchResults");
> // Create a search control
> searchControl = new GSearchControl();
>
> It should work then.
>
> Good luck,
> Ben
>