Bingo!

yup the customPanel() function didnt like being local to getDirections
() function.
Took it out and made the drn variable global and away we go!

thanks!

On May 22, 7:19 pm, "[email protected]" <[email protected]>
wrote:
> On May 22, 11:01 am, simonDev88 <[email protected]> wrote:
>
> > After a bit of experimentation, I have got a piece of code in there
> > that lays out the directions e.t.c.
>
> > It worked when i first put the code in, but now that i have shuffled
> > the code about a bit, to render the directions on button press, the
> > directions dont seem to load up.
> > Im getting an error saying that "customPanel is not defined", I can't
> > see why,  even when i put an alert in "customPanel" i dont get
> > anything.
>
> >http://chilternstravel.co.uk/directionstest.aspx
>
> > hit go and if you have firebug, you will see the error appear.
>
> IE tells me 'drn' is undefined.
>
> It is a local variable of the getDirections function, but customPanel
> runs in the global context...
>
> firefox probably doesn't like the fact that the customPanel function
> is also local to the getDirections function.
>
> see this page from Mike Williams' tutorial:
> Javascript Concepts Part 1 Scopehttp://econym.org.uk/gmap/scope.htm
>
>   -- Larry
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to