title: Google Maps API - storing image URL and calling it
body: <p>I've added an image URL to an entry in the mySQL database, and I want it do be displayed in the information window on my sidebar.</p>
  
  <p>Here's what the part I'm fiddling around with:</p>
  
  <pre><code>downloadUrl("genxml.php", function(data) {
    var xml = data.responseXML;
    var locations = xml.documentElement.getElementsByTagName("marker");
    for (var i = 0; i &lt; locations.length; i++) {
      var name = locations[i].getAttribute("name");
      var address = locations[i].getAttribute("address");
      var type = locations[i].getAttribute("type");
      var price = locations[i].getAttribute("price");
      var img = locations[i].getAttribute("img");
      var point = new google.maps.LatLng(
          parseFloat(locations[i].getAttribute("lat")),
          parseFloat(locations[i].getAttribute("lng")));
      var html = "&lt;div class=loc-img&gt;&lt;img src=" + img + "/&gt;&lt;/div&gt;&lt;div class=loc-name&gt;" + name + "&lt;/div&gt; &lt;br/&gt;" + address + "&lt;br/&gt;" + "&lt;div class=loc-type&gt;" + type + "&lt;/div&gt;&lt;div id=loc-price&gt;Price Rating:" + price + "&lt;/div&gt;";
  </code></pre>
  
  <p>The bit at the bottom looks right to me, so I can't work out what's wrong.
  The image is saved on the server, and the URL has been added to the img field of the entry, and there are no spelling errors. When the page loads, and the info window loads, this shows in the Inspector.</p>
  
  <pre><code>&lt;img src="null/"&gt;
  </code></pre>
  
  <p>Here are the details of the column from phpMyAdmin, whcih I think could be causing the problem. <strong>varchar(120)  latin1_swedish_ci</strong>, Null is set to no. I assumed that because it was a URL, varchar would be the appropriate choice.</p>
  
  <p>Any thoughts?</p>
  
  <p>EDIT: I am also having a similar issues with another field. I think it might be related. There's a 'price' field, set to <strong>int(5)</strong>, and is simply a rating of 1 to 5. However, when the info window displays, it just says 'null'</p>