I have four links:
<a href="http://google.com" target="_blank">Google</a>
<a href="http://bing.com" target="_blank">Bing</a>
<a href="http://yahoo.com" target="_blank">Yahoo</a>
<a href="http://wikipedia.com" target="_blank">wiki</a>
When I click on a link, it will opens in a new window. And on click to another link, it will opens in the same window opened last time.
It is not good for me, I want to open a blank window on every single click, regardless of the opened windows.
How can I handle this? (I don't care about double-click Google link opens it twice, doesn't matter.)
And this is works, just it have to.
EXCUSE ME, communication problem with my PHP beast.
So, actually the links are like:
<a href="javascript:;" onclick = "window.open('http://google.com','Admin');">gaagle</a>
<a href="javascript:;" onclick = "window.open('http://bing.com','Admin');">bang</a>
<a href="javascript:;" onclick = "window.open('http://yahoo.com','Admin');">yahuu!</a>
And now, all the stuffs opens to the same window, because of the name tag (2nd param of window.open) -.- And since all the opened window's ID was Admin, every other windows opened on that window. I did not checked it, excuse me for wasting your time.
If you give each link a different target, they will open in different tabs / windows.
<a href="http://google.com" target="googleWindow">Google</a>
<a href="http://bing.com" target="bingWindow">Bing</a>
<a href="http://yahoo.com" target="yahooWindow">Yahoo</a>
<a href="http://wikipedia.com" target="wikiWindow">wiki</a>
If you click a second time on a link, it will re-use the existing window if it is still available.
If you use target="_blank"
every click should be in a new tab / window, regardless of previous clicks. If you aren't getting this behaviour, what browser are you using?
If you want all clicks to goto the same window use...
<a href="http://google.com" target="myWindow">Google</a>
<a href="http://bing.com" target="myWindow">Bing</a>
<a href="http://yahoo.com" target="myWindow">Yahoo</a>
<a href="http://wikipedia.com" target="myWindow">wiki</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With