The problem is that in Javascript, function references are variables.
If you write
function directions(dirStart) {
...
directions = new GDirections(map, directionsPanel);
...
}
Then "directions" is no longer a reference to your function, it's a
GDirections Object. So the next time you get here
onSubmit="directions(document.getElementById('dirStart').value);
return false;"
It crashes, because you can't call a GDirections Object like that. It
never gets as far as the "return false", so nothing stops the <form>
from performing its default "action", and it reloads the page for you.
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---