I am doing the following thing to replace some part of the string. I want to replace all three occurence of the string but it is not working.
var hdnval = document.getElementById("hdnColgval").value = response;
$("#ddcolgs").val($("#ddcolgs").val().replace(/'+hdnval+'/g, response));