I m trying to open a new window from my web page while clicking on the 'number#' lsted in my page, actually, it's a google search(eg: https://www.google.com/search?q=12312), and got the results in the new tab
I am also trying to replace the search query parameter again while clicking on another Number#(eg: https://www.google.com/search?q=456456), But replace functionality not working. Below I am placed the demo code
let win;
let firstSearch = () => {
win = window.open('https://www.google.com/search?q=123123', '_blank');
}
let secondSearch = () => {
win.location.replace('https://www.google.com/search?q=345345')
}
But its not working. But I remove '/search' from the URL replacement is happen. So, any solution for this search and replacement parameters