Hi all,<div><br></div><div>I'm currently creating popups and populating their html content with the following code</div><div><br></div><div><br></div><div><div>function onFeatureSelect(evt) </div><div>{selectedFeature = evt.feature;</div>
<div>popup = new OpenLayers.Popup.FramedCloud(</div><div>"chicken",</div><div>evt.feature.geometry.getBounds().getCenterLonLat(),</div><div>null,</div><div>"<div style='font-size:.8em'>User Name: " +<a href="http://evt.feature.id" target="_blank">evt.feature.id</a> + "</div>", </div>
<div>null, true, onPopupClose);evt.feature.popup = popup; map.addPopup(popup);}</div></div><div><br></div><div>rather than pull out the attributes myself, I'd like to pass in a preformed html string via a variable, but I'm not sure how to do this, and I currently lack a sufficient knowledge of jscript syntax to research this. I can form an html string via this function but I'm not sure how to pass it back to the popup function above...</div>
<div><br></div><div><div>function popupHTML(tweet) {</div><div>var retval = '';</div><div>retval += '<div class="tweet_info">';</div><div>retval += '<img alt="' + tweet.from_user_id + '" src="' +</div>
<div>tweet.profile_image_url + '" class="tweet_profile"/>';</div><div>retval += '<h3>' + tweet.from_user + '</h3>';</div><div>retval += '<p>' + tweet.text + '</p>';</div>
<div>retval += '<p>Source: <a href="' + tweet.source + '"/>' +</div><div>tweet.source + '</a></p>';</div><div>retval += '</div>';</div><div>return retval;</div>
<div>}</div></div><div><br></div><div>thanks again in advance...</div>