That's easy,

// create marker
var marker = new google.maps.Marker({
     position: location,
     map: map
});

// create the html
html = '<div id="info_content">here your content <button
onclick="loadContent()">load content</button></div>';

// load the info window with the html
stepDisplay.setContent(html);
stepDisplay.open(map, marker);

function loadContent(){
     document.getElementById('info_content').innerHtml = 'Now here you add
your new code';
}


if you want that the message pop-out when you click the marker, you must add
an event listener:

 google.maps.event.addListener(marker, 'click', function() {
     stepDisplay.setContent(html);
     stepDisplay.open(map, marker);
}


If you have more doubt, take a look to some of mine experiments:
www.federicoulfo.it/maps/

Cheers


2010/8/4 Grok Lobster <[email protected]>

> Nothing to do with the maps API.
>
> http://javascript-reference.info/
>
> On Aug 4, 5:48 am, Pawan <[email protected]> wrote:
> > I want to put a button in the info window, so that on clicking the
> > button, the contents of the info window change, and new contents (pre-
> > written)  appear with a new button. On clicking this new button the
> > contents come back to their original state. Please help.
>
> --
> 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]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>

-- 
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