I'm using this to insert some string data:
$("#edit_order #"+key).val(value.replace('+',' '));
However, the second instance of "+" is not being replaced with this string:
123123123+APT+123
Instead I get the output:
123123123 APT+123
I'm using this to insert some string data:
$("#edit_order #"+key).val(value.replace('+',' '));
However, the second instance of "+" is not being replaced with this string:
123123123+APT+123
Instead I get the output:
123123123 APT+123
Use:
value.replace(/\+/g, ' ')
g
is a global match flag and will cause your replace to match all instances of +
.