On Oct 21, 10:39 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I guess where I am having problems is around lines 206-213 where I've
> inserted the search code inhttp://www.hardins.com/retail5.htm.  I get
> confused with how many parentheses or {} go where.

move the entire showAddress function
(from function showAddress() { to the final closing brace "}") to just
before the GDownloadUrl call

See this page:
Part 1 Scope
http://econym.org.uk/gmap/scope.htm
from Mike Williams' tutorial for more information on variable/function
scope.

PS - I now get a key error on http://www.hardins.com/retail5.htm

  -- Larry

>
> On Oct 21, 9:29 am, "warden [Andrew Leach - Maps API Guru]"
>
> <[EMAIL PROTECTED]> wrote:
> > On Oct 21, 2:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > Http:www.hardins.com/retail5.htm
>
> > > Error: showAddress is not defined
> > > Source File:http://hardins.com/retail5.htm
> > > Line: 1
>
> > Function showAddress appears to be defined within the GDownloadUrl
> > callback function [see line 116 of the HTML]. Consequently it won't be
> > available outside that function.
>
> > It also appears that you define your map within that callback
> > function. I'm amazed that works. It's possible I've misinterpreted
> > your code indentation and missed a closing } somewhere.
>
> > I would recommend:
> >  - you regularise your indentation;
> >  - you put all Javascript functions into a script block in the <head>
> > of the page;
> >  - you put the Javascript you need to make the page work just before </
> > body>, and ensure that you do a dry run through the code execution --
> > that is, work out by hand what's going to happen before running the
> > page and trying to interpret the errors generated.
>
> > I'd also recommend not starting new threads when you already have at
> > least one going for this page.
>
> > Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to