<div>Hi all,</div><div><br></div><div>I&#39;m still having troubles with my popups. I don&#39;t think I fully grasped Eric&#39;s advice. The error I get in Safari&#39;s error console is the following result of expression popup is not an object, referencing line 10 of my code and line 803 of Openlayers.js (2.8). Any suggestions?</div>
<div><br></div><div>function onPopupClose(evt) {</div><div>            selectControl.unselect(selectedFeature);</div><div>        }</div><div><br></div><div>function onFeatureSelect(evt) {</div><div>            selectedFeature = evt.feature;</div>
<div>            popup = new OpenLayers.Popup.FramedCloud(&quot;chicken&quot;, </div><div>                                     feature.geometry.getBounds().getCenterLonLat(),</div><div>                                     null,</div>
<div>                                     &quot;&lt;div style=&#39;font-size:.8em&#39;&gt;Site_ID: &quot; + feature.attributes.title +&quot;&lt;hr /&gt;Locality: &quot; + feature.attributes.title+&quot;&lt;br/&gt;Description: &quot; +feature.attributes+&quot;&lt;br/&gt; Feature ID: &quot;+<a href="http://feature.id">feature.id</a>+&quot;&lt;br/&gt;Feature Type:&quot;+feature.attributes.NEWSITE_ +&quot;&lt;/div&gt;&quot;,</div>
<div>                                     null, true, onPopupClose);</div><div>            feature.popup = popup;</div><div>            map.addPopup(popup);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>        }</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>  function onFeatureUnselect(feature) {</div><div>            map.removePopup(feature.popup);</div><div>            feature.popup.destroy();</div><div>            feature.popup = null;</div>
<div>        }    </div><div>...</div><div><div>sites.events.on({</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&#39;featureselected&#39;: onFeatureSelect,</div><div>    <span class="Apple-tab-span" style="white-space:pre">                </span>&#39;featureunselected&#39;: onFeatureUnselect</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>});</div><div><br></div><div>            selectControl = new OpenLayers.Control.SelectFeature(sites,</div><div>                {clickout: true,</div><div>
<span class="Apple-tab-span" style="white-space:pre">                                </span>toggle: false,</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>hover: false,</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>}</div>
<div>            );</div><div>            map.addControl(selectControl);</div><div>            selectControl.activate();</div></div><br>-- <br>Nicholas Efremov-Kendall<br>Fulbright Student 2009-2010, Ukraine<br><a href="mailto:nefremov@artsci.wustl.edu">nefremov@artsci.wustl.edu</a><br>
c/o Halyna Yerko<br>Balzaka 92a, Kv 27<br>02232<br>Kyiv, Ukraine<br>(mob) +380963576524<br>