hello,
i use this code to pass value to query string it works fine. the problem is i already have query string value and i want to add another query strin like
url.com?Orderid=0001 this i already have i want to add &status="active" through this javascript
currently when i use this below javascript it removes the orderid=001 query string and then add status="active" i want to keep the orderid=001 and add &status="Active" query string please advice
<script type="text/javascript">
$(function () {
$('[id*=LinkButton1]').on('click', function () {
var type ="Active";
var oldURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
var newUrl = oldURL + "?status=" + type;
if (window.history != 'undefined' && window.history.pushState != 'undefined') {
window.history.pushState({ path: newUrl }, '', newUrl);
}
return false;
});
});
</script>