javascript - open new html in same tab caused problems -


im tyring open new html in same tab added "_self", since use function not respond well, cant load content , cause program no work worked without "_self".

p.s. - using window.opener.var might reason.

is there can fix it?

window.open('category.html',"_self"); 

you need use this:

  window.location.href = "category.html"; 

you using window.open () method open page in new tab. window.location.href change url in same tab.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -