Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Opening links from multiple pages in specific tab/window

Posted by: AlternatorDelux Sep 18 2022, 10:09 AM

I'm well aware that this is usually a bad idea, but for the internal use of several people this would help massively with day-to-day work.

I have links that are set to open in a seperate tab or window (depending on browser setting). To prevent an additional window from being opened every time links are clicked after the first one, I have the links name a target, like this:

<a href="b.html" target="window2">New Window</a>

This works as intended when the links are all being opened from a single page. But what I need is for it to work that way even when the links are being opened from different pages.

Posted by: Christian J Sep 18 2022, 02:32 PM

I don't know if that can be done with HTML alone. Maybe with the javascript "window.opener" and/or "window.closed" properties, but I don't know any details.

Posted by: Makron Oct 3 2022, 01:10 PM

Hello! Try testing it in a regular html online editor. I succeeded.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)