Expected: See 1-5 stars in Google Maps callout box
Actual: Page blinks and shows only a long list of stars on the top of the page.
I suspect I shouldn't be using document.write?
<html>
<head>
<script type="text/javascript">
//some Google Maps API code
function showstar(x)
{
var i = 0;
while (i < x)
{
document.write("<img src=\"img/star.gif\" width=\"15\" height=\"15\" />");
i++;
}
}
var html = "Review stars: " showstar(star)
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
</script>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 700px; height: 500px"></div>
</body>
</html>