title: Can I use getElementById() in a Maps infowindow in JavaScript?
body: <p>I have an several markers placed on a Google Maps map and every marker has an infowindow with the following content:</p>
  
  <pre><code>            // Set the content of the infowindow of the marker.
              var infoContent =
                '&lt;div id="iw-container" class="gm-style-iw"&gt;'+
                  '&lt;div class="iw-title"&gt;'+
                    '&lt;p&gt;{{place.name}}&lt;/p&gt;'+
                  '&lt;/div&gt;'+
                  // For each photo associated with this place, add it.
                  '&lt;div class="container-fluid"&gt;'+
                    {% for photo in place.photo_set.all %}
                      '&lt;div class="row"&gt;'+
                        '&lt;div class="col-md-4"&gt;'+
                          '&lt;hr&gt;'+
                          '&lt;div class=""&gt;'+
                          // Check whether the attributes have a value and display them.
                            {% if photo.info != "" and photo.info != None  %}
                              '&lt;p class="iw-info"&gt;{{ photo.info }}&lt;/p&gt;'+
                            {% endif %}
                            {% if photo.year != "" and photo.year != None  %}
                              '&lt;p class="iw-year"&gt;{{ photo.year }}&lt;/p&gt;'+
                            {% endif %}
                            {% if photo.source != "" and photo.source != None  %}
                              '&lt;p class="iw-source"&gt;Bron: {{ photo.source }}&lt;/p&gt;'+
                            {% endif %}
                          '&lt;/div&gt;'+
                          // Display the image with a link to the modal view.
                          '&lt;div class="iw-image"&gt;'+
                            '&lt;img id="{{ photo.id }}" class="iw-image" src="../static/images/{{ photo.image }}"&gt;'+
                          '&lt;/div&gt;'+
                        '&lt;/div&gt;'+
                      '&lt;/div&gt;'+
                    {% endfor %}
                  '&lt;/div&gt;'+
                '&lt;/div&gt;';
  </code></pre>
  
  <p>I want to add a modal view for every image in every infowindow, but I can not do this: </p>
  
  <pre><code>var img = document.getElementById("{{ photo.id }}");
  </code></pre>
  
  <p>This is because every time the img variable is Null.</p>
  
  <p>Is it possible to access infowindow content with getElementById()?</p>