Remove hashtags and ampersands from service variables

6 views
Skip to first unread message

G Bxx

unread,
Feb 11, 2016, 10:54:32 AM2/11/16
to Leaflet
I have the following code segment that reads values from an Arc web service and everything works fine. However, I would like to remove hashtags and ampersands from "{field1}".

projects.bindPopup(function (feature) {
   return L.Util.template('<a href="' + baseURL + '?field1={field1}&ProjName={field2}' + '" target="Details"><b><u>{field1}</u></b></a> <p>Funds: {funds}<br>Expenditures: {Expenditures}<br>Balance: {balance}</p>', feature.properties);


I've tried using the javascript replace() method, but it did not work. Any ideas on how I can remove these characters?

Thanks in advance
Reply all
Reply to author
Forward
0 new messages