A common problem that I has been worked and I always forget it is that JavaScript does not have a “ReplaceAll” function, so I simple way to fix it is with a next snip of code that replace all occurrences of a blank space:
var myVar = "Hello Word"; myVar = myVar.split(" ").join(""); alert(myVar); |