I am trying to open a url in a new tab with the below code, but can't able to do so
partial_url = '/products/compare/?ids=f25353f4e8f2,598f4166e2d9,39c17d76-133e-4a86-bf39-d4d5e600349a&fis=1,2,3,4,5,6,8,10'
final_url = window.location.host + partial_url + '&new_html=true';
var win = window.open(final_url, '_blank');
win.focus();
The above code was opening a new tab but with about:blank in the address bar, but was not opening my url, so what's wrong in the above code ?
Note:
final_url = 'http://localhost:8000/products/compare/?ids=f25353f4e8f2,598f4166e2d9,d4d5e600349a&fis=1,2,3,4,5,6,8,10&new_html=true'