I'm not so sure of how to ask my question, will try my best to explain.
My HTML,
<a target="aaa" href="mmmmm.html?hai=aaa" onClick="return openlinkNew(this)">mmmmm</a>
its javascript:
function openlinkNew(a) {
var aaa=a.split("?")[0];
var tab1 = window.open(aaa.href, aaa.target);
tab1.close();
return false;
}
What i need to do now is, to close the tab which contains mmmmm.html
with no query string when user clicks a link in other page.
I used var aaa=a.split("?")[0];
to split the url from its query string and used
var tab1 = window.open(aaa.href, aaa.target);
tab1.close();
to close that tab. But it is not working. Why? Any Suggestion?