Open anchor link in new 80% wide window

I have a long list (~260 items) that uses anchors to link to specific part of another page. This currently works but the new page is full size and hides the original and confused the reader.
<a href=Our_Bylaws_doc.php#year1981-3" target="_blank">1981</a>
How… can I have this page open in something smaller than the original? And, ideally close when the new page looses focus.
Thank you for any assistance / help or advice.

You can open a link in a new browser window of a specific size using javascript. But…

It is considered best practice (to avoid confusing visitors) to not use target="blank" and to open links in the same tab/window. This gives then the choice to whether they want a new tab/window for the content.

1 Like

And an example or link to a sample would be??

Not sure i agree with that statement. Quite hotly debated with pro’s and con’t to both. A lot of the time it depends on what the page is doing. Google for example on the normal web search opens in the same tab as it expects the user wants to visit the website in it’s entirety whereas on a Google image search if you click ‘visit website’ it opens in a new window as they assume you just want to look at the image and will probably want to continue with looking at other images almost immediately (well that’s my assumption).

I prefer to open internal links in the same tab and any PDFs or website links to external sites i open in a new tab. I get annoyed when i click a link and get taken away from the website i was on and have to use the back button.

I think it is quite a user preference though. Ideally you could actually ask your users whether they want to open links in new tabs or not and set it by a cookie to remember their setting. Which shouldn’t be too hard with a bit of thought and a few css classes.

If you mean then the details can be found here.

Be aware of the problems with opening new windows especially resized ones that are likely to be blocked by adblockers etc (ignoring accessibility concerns for now). Read the MDN article for full details and other issues.

Yes its an age old debate but I still prefer to leave it to my users to decide. There are exceptions of course but they need to be managed correctly.

However, I think that authors should be able to make their own choice once they’ve read the pros and cons and decide on what’s right for them. There ‘never ever’ is a one size that fits all but a list of pros and cons and you have to weigh them up and decide on the best course of action for the task concerned.

Sounds like it may be better to open a modal on the same page perhaps or if all 260 link destinations are on another single page then why not include the navigation on that page to start with and just keep users on the same page? e.g. Similar to how the W3C does it with their long list of links here (i.e. links on the left and content in the main panel on the right).

Obviously if your 250 links are links to 250 different pages of your site then I might suggest some better sort of navigation might be required especially if each page is heavy with images and content.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.