Many thanks.

Ended up doing the same thing in jQuery - and hugely grateful to you
for sorting this out...

Gave every box the same class ('xxxx') and used their class selected
to solve the problem.

                infoWindow.open(map, marker);
                jQuery('.xxxx').parent().parent().css('overflow-y','visible')
                jQuery('.xxxx').parent().css('overflow-y','visible')



Martin

On Sep 6, 6:35 pm, Peter Lawless <[email protected]> wrote:
> Hi Franky
>
> Good spot when you are opening the infowindow as you are so you come into
> the map with the infowindow open it shows up my badly designed code!
>
> What I should have done is wait for the 'domready' event to fire, before
> trying to access the div.
>
> google.maps.event.addListener(infowindow, 'domready', function() {
> document.getElementById('xxxx').parentNode.style.overflow='';
> document.getElementById('xxxx').parentNode.parentNode.style.overflow='';
>    });
>
> I tried the above code which has removed that problem.  Strangely when I
> made the change I needed to remove the overflow auto from the next div up as
> well.  No idea why.
>
> Posted the code athttp://www.lawless.info/gmaps/bubble_test.html
>
> Pete
>
> On Sun, Sep 5, 2010 at 4:49 PM, Franky Van Liedekerke <
>
>
>
> [email protected]> wrote:
> > On Thu, 26 Aug 2010 22:46:02 +0100
> > Peter Lawless <[email protected]> wrote:
>
> > > Hi Brad & Franky et al
>
> > > Over a glass this evening I thought it would be a better approach to
> > > use a bit of JS and work out from my own content div to fix the
> > > overflow:auto issue rather than in via about 6 divs with CSS.
>
> > > I gave my content div an id of 'xxxx' thinking it might attract the
> > > attention of the Australian development team!
> > > Then document.getElementById('xxxx').parentNode.style.overflow='';
> > > added immediately after the infowindow.open removes the overflow
> > > style from the parent div.
>
> > > Problem, at least for now, solved. Modified code now at
> > >http://www.lawless.info/gmaps/bubble_test.html
>
> > > Can anyone think why we should not take this approach?
>
> > > Regards
>
> > > Pete
>
> > Well, this might work if your page is created statically, but I'm using
> > a dynamically created page and need to call the google map API
> > asynchronously. When I then do this:
>
> > var s_map = new google.maps.Map(div_id, myOptions);
> > var s_infowindow = new google.maps.InfoWindow({ content: "<div
> > id=\"locationballoon\"
> > class=\"location-balloon\">TEST</div>" });
> > ....
> > s_infowindow.open(s_map,s_marker);
> > document.getElementById("locationballoon").parentNode.style.overflow='';
>
> > I then get a javascript error:
> > Error: document.getElementById("dbemlocationballoon") is null
>
> > While in the generated page, the id is indeed there, it seems the
> > javascript is called earlier and thus can't see that specific new id.
>
> > So I will now try the CSS method.
>
> > Franky
>
> > --
> > 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%2B 
> > [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