yoram February 2016

open new html in same tab caused problems

Im tyring to open new html in the same tab so I added "_self", but since I use it the function not respond so well, it cant load all the content and basically it cause my program no to work as it worked without "_self".

p.s. - I using window.opener.var so it might be the reason.

Is there anything I can do to fix it?

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

Answers


Marcos Pérez Gude February 2016

You need to use this:

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

You are using a window.open () method that open your page in a new tab. With window.location.href you change the url in the same tab.

Post Status

Asked in February 2016
Viewed 3,640 times
Voted 6
Answered 1 times

Search




Leave an answer