Hi there, is difficoult to understand without a working example online, I will try to make a guess. I would say that your html variable is defined with an insufficient scope in respect to the click listener. When the event is fired and the callback function is called html is not defined anymore. Try to attach the html object is to the Marker object as an attribute and inside the callback function access it as Marker.html Hope it works, Davide
2010/6/21 AngelicCore <[email protected]> > Hi, i've had some trouble adding an Ajax rating control to Infowindow. > Does anyone know how to do it? > > My site is still under development on my File System so i can't post a > link but all i need is to know how to add the rating control to the > infowindow html section. > > that's the code so far in that section: > > Photo = Markers[j].getAttribute("Photo"); > Point = new > google.maps.LatLng(parseFloat(Markers[j].getAttribute("Lat")), > parseFloat(Markers[j].getAttribute("Lng"))); > URL = "ViewEntity.aspx?EntityName=" + Name; > html = "<div style='min-width:220; min-height:100;'>" + "<img > src='Thumbnail.ashx?Size=100" + "&PhotoPath=" + Photo + "'>" + "</ > div>" + "<div style='min-height:100;'>" + "<b>" + Name + "</b> <br/>" > + Address + "<br />" + "<a href='" + URL + "'>Show Entity</a>" + "</ > div>"; > Icon = CustomIcons[Type]; > Marker = new google.maps.Marker({ map: Map, position: Point, icon: > Icon.Icon }); > Marker.setZIndex(undefined); > BindInfoWindow(Marker, Map, InfoWindow, html); > > > function BindInfoWindow(Marker, Map, InfoWindow, html) { > google.maps.event.addListener(Marker, 'click', function () { > InfoWindow.setContent(html); > //InfoWindow.disableAutoPan = true; > InfoWindow.open(Map, Marker); > }); > } > > > another question, although this is far less crucial for me. I am using > master pages, so i have the <script> tags in the master page. Problem > is, when i need to access that JS file which is in ./Scripts/GMaps.js > in a page within a folder like ./Categories i am unable to do that > because it looks for in ./Categories/Scripts/.js not in ./Scripts > The way I've solved it this far is by making a copy of the file and > putting it in the Categories/Scripts/. > Is there a better way to do that? > code in master page in the head section: > > <script src="http://maps.google.com/maps/api/js?sensor=false" > type="text/javascript"></script> > <script src="http://www.google.com/jsapi" type="text/javascript" > ></script> > <script src="Scripts/GMaps.js" type="text/javascript"></script> > > if there is anything i can add to help you answer my question please > say so. > > -- > 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.
