is it possible to change parameter in url bar so button onclick the parameter to get changed ? So far I have this:
function change_product(){
var url = 'http://www.example.com/index.php?product=805';
var newSrc = '0';
newurl=url.replace(/(product=)[^\&]+/,'$1' + newSrc)
alert(newurl);
}
<button class="save" type="BUTTON" onclick="change_product();">Copy</button>
newurl is correct but how to make it change in the url bar? Is it possible at all without page reload? thanks in advance !