Mike,

Thanks a lot. It works!

Regards,

Adrian

On Mar 6, 3:38 pm, Mike Williams <[email protected]> wrote:
> What's happening is that your html gets created like this
>
> var html = "... onclick=\"SaveMarkerInfo('"
>            + document.getElementById("e_name").value
>            + "') ... ";
>
> The document.getElementById("e_name").value gets evaluated immediately,
> before the infowindow gets created. That's not what you want. You want
> it to be evaluated after the user clicks the button.
>
> One way to do it is to rewrite your SaveMarkerInfo() function so that it
> gets passed the id of the field rather than the value and does this
>
> SaveMarkerInfo(id)
>   var value = document.getElementById(id).value
>
> and use
>   onclick=\"SaveMarkerInfo('e_name')\"
>
> --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
-~----------~----~----~----~------~----~------~--~---

Reply via email to