I had a code that works but the problem is it just append the parameter
instead of replacing it with a new parameter, Here is my working code:
jQuery('#input_1_11').change(function(){
var type = jQuery('#input_1_11').val();
if(type=='Inspection'){
window.location.replace(window.location.href + "?Inspection");
}
else if(type=='Installation'){
window.location.replace(window.location.href + "?Installation");
}
else{
window.location.replace(window.location.href + "?Maintenance");
}
});
what currently happening is for example
www.test.com?Inspection
Then if I click again the input11 it goes to the link
www.test.com?Inspection?Maintenance
What I need is to replace each ?parameter every change by user.
window.location.hostname + "?Inspection"?