title: Google maps version change freezes website - v3
body: <p><strong>Edit: The site is working properly again.  I deleted the line of code flagged by commentors below (referencing a nonexistent div), experimented with version syntax, and also with the order of parameters in my contentBox function).  Also deleted the  syntax and added a line of code to call the function from the DOM.  Thanks to all who commented.  Some combination of the above worked.  Cheers, Cheryl)</strong></p>
  
  <p>Note: I asked this question in the main forum yesterday -- didn't realize that the google maps user group had its own tag in Stack Overflow.  Here's the Q:</p>
  
  <p>I have an application that uses Google maps API v. 3 and accesses content from a database to display in google's infowindows and a sidebar. See the code for the main file here: www.corkmemorymap.org.</p>
  
  <p>My problem is that, periodically, the function that brings up content in the sidebar when a user clicks on a marker stops working. You can still access sidebar content via the topic search at the top of the page (that is done with jquery, and not tied to google or the markers) but I can't get sidebar content through the markers.</p>
  
  <p>The last time this happened, it was a version issue. I added a version to the script code that calls the API, and all was well.</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3.9&amp;sensor=false"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This time I thought it was the same thing, as I saw Google had deprecated that version. So I updated to the new version and... nada. So now I am stumped. I tried messing around with different versions, or no version, and had it briefly working again. Then not. Does anyone else have experience with this? Are the versions unstable? Any suggestions?</p>
  
  <p>If it helps, this is the function that calls the change in sidebar content:</p>
  
  <pre><code>function contentBox(marker, map, sidebar, winHtml, infoWindow) {
      google.maps.event.addListener(marker, 'click', function() {
          document.getElementById('sidebar').innerHTML=winHtml;
          infoWindow.close(map, marker);
      });
  }
  </code></pre>
  
  <p>Oh, one other thing -- I'm not using an API key as this is a non-profit website.  Do I need an API key (it's been working without one since December 2011)? Is there anything tricky about them?</p>
  
  <p>Regards, Cheryl</p>