Empty links open in the same window - Why and how to fix it?
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 the link, it opens in a new window. And when you click on another link, it will open in the same window that opened for the last time.
This is not good for me, I want to open an empty window for every click, regardless of the open windows.
How can I handle this? (I'm not interested in double-clicking on a Google link that opens twice does not matter.)
And it works, just needed.
EXCUSE ME, a communication problem with my PHP stars.
So, in fact, the links are similar to:
<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 materials open in the same window because of the name tag (2nd parameter window.open) -.- And since all the open window identifiers were Admin, all other windows opened in this window. I did not check it, sorry to waste your time.
If you give each link a different purpose, 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 on the link a second time, it will reuse the existing window if it is still available.
If you use target="_blank"
, each click should be in a new tab / window, regardless of previous clicks. If you do not get this behavior, which browser are you using?
If you want all clicks to be used in the same window ...
<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>