Possible Duplicate:
Why does javascript replace only first instance when using replace?
I have this variable
var newRow = "<td><div> [[myvar]]</div> <div> [[myvar]]</div> </td> "
When i do this
newRow = newRow.replace('[[myvar]]', '10');
Only first occurance gets replaced and not the second