This might have something to do with closures, which I am only just
learning about, so if it does can someone shed some light as i would
like to understand what im doing wrong.

Basically im loading a map with some markers on it which come out of a
database and they have some html associated with them which is
basically an update form. The infowindow /s (not sure if i have one or
many in the way ive coded it ) load using the marker.html. When I
close the infowindow i want to save the form as it currently is back
to the html property of the marker that the infowindow is associated
with.

My problem is i cant get the html of the infowindow as it currently
stands when i hit the close button.

Dont be misguided, my problem is not saving the html back to the
marker html property, i can do that just fine manually and the
infowindow will reopen with my saved changes. My problem is getting
the form as it stands in the infowindow when i close the infowindow.

Hope that makes sense.


On Jun 2, 11:05 pm, Chris Broadfoot <[email protected]> wrote:
> ... have you got a link to show us what you've tried?
>
> I tried something similar over here and as expected, it worked fine.
>
> Chris
>
> On Thu, Jun 2, 2011 at 9:55 PM, Hadyn Dickson <[email protected]>wrote:
>
>
>
>
>
>
>
>
>
> > Tried that but I get the same result.
>
> > On Jun 2, 5:14 pm, meetamit <[email protected]> wrote:
> > > Try alerting infowindow.getContent()
>
> > > On Jun 1, 11:02 pm, Hadyn Dickson <[email protected]> wrote:
>
> > > > Hi everyone, this is probably straight forward but I cant seem to get
> > it
> > > > working.
>
> > > > I have an infowindow on my map which is attached to a marker and the
> > > > infowindow contains only the following html <input type="text"
> > > > value="before">
> > > > I then have the following javascript in my head
>
> > > >     google.maps.event.addListener(infowindow, 'closeclick', function()
> > {
> > > >       alert(infowindow.content);
> > > >     });
>
> > > > If I click my marker and change the value of the input field to "after"
> > and
> > > > click the close button on the infowindow I get the alert but it says
> > <input
> > > > type="text" value="before"> when I should have my after text in it.
>
> > > > What am I doing wrong, its driving me crazy!
>
> > > > Thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
>
> --http://twitter.com/broady

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to