Forum Moderators: open
As its all javascript with google maps, I tried this
var placename = markers[i].getAttribute("placename");
var placename2 = placename.replace("_", " ");
I want to use it in the <a href I build
place.php?place=" + placename + ">" + placename2 + "</a>";
When I try to call it, it says placename2 has not been defined, please help
Could do with some help on this, can't find anything that works, yet
I have managed to get it to work BUT if the string is
hello_there_world
It only replaces the first _
hello there_world
How do i get it to work on all underscores
OK got an answer on a n other forum (tut tut) so for anyone else who needs to know here it is
replace(/_/g," ");