Sometimes: No option to open link to a new tab

User Help for Mozilla Firefox
Post Reply
T-buch
Posts: 41
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Sometimes: No option to open link to a new tab

Post by T-buch »

Sometimes you dont have the option to open a link to a new tab (mouse click + CTRL) -Why is that? and can it be bypassed
Last edited by LIMPET235 on November 30th, 2019, 4:41 am, edited 1 time in total.
Reason: Some slight text editing....as the OP noted.
User avatar
DanRaisch
Moderator
Posts: 127243
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Sometimes: No option to open link to a new tab

Post by DanRaisch »

Can you provide3 an example of such a URL/link?
T-buch
Posts: 41
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Re: Sometimes: No option to open link to a new tab

Post by T-buch »

https://www.tvguide.dk/ - the pictures at the top of the page
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Sometimes: No option to open link to a new tab

Post by therube »

You can; right-click, then Ctrl+View Image (or right-click, then center-click while over View Image).
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
T-buch
Posts: 41
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Re: Sometimes: No option to open link to a new tab

Post by T-buch »

This showing the pic - There is a url "under" the image (sorry if i not give the correct technicology explanation)
User avatar
DanRaisch
Moderator
Posts: 127243
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Sometimes: No option to open link to a new tab

Post by DanRaisch »

There's a lot of scripts running on that site that might be intercepting Firefox standard commands.
T-buch
Posts: 41
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Re: Sometimes: No option to open link to a new tab

Post by T-buch »

but can it be ignored?
morat
Posts: 6435
Joined: February 3rd, 2009, 6:29 pm

Re: Sometimes: No option to open link to a new tab

Post by morat »

The img element uses a click event listener to change the current page.
User avatar
WaltS48
Posts: 5141
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Re: Sometimes: No option to open link to a new tab

Post by WaltS48 »

morat wrote:The img element uses a click event listener to change the current page.
That means it can't be ignored?

If I click an image a new page opens with a complete article, but there is no way to open that article in a new tab.

https://www.tvguide.dk/nyheder/81629/sa ... ns-er-slut
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5
User avatar
jscher2000
Posts: 11770
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Sometimes: No option to open link to a new tab

Post by jscher2000 »

If you right-click the element and Firefox doesn't show Link-specific items at the top of the context menu, then it is not a link and tricks that work with links are unlikely to work.
T-buch
Posts: 41
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Re: Sometimes: No option to open link to a new tab

Post by T-buch »

Thanks enlighten me
Sometimes I find that links (which are obviously not the right way to describe them, sorry) open up as a small pop-up window - for example, a video that starts.
I assume there isn't a trick, either, that can make that video open in a new tab? Are there ways to find a direct address for these kind of video links?
User avatar
WaltS48
Posts: 5141
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Re: Sometimes: No option to open link to a new tab

Post by WaltS48 »

jscher2000 wrote:If you right-click the element and Firefox doesn't show Link-specific items at the top of the context menu, then it is not a link and tricks that work with links are unlikely to work.
How does clicking one of those elements on that site, open the page with a text article along with the image if it is not a link?

JavaScript?
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5
User avatar
dickvl
Posts: 54163
Joined: July 18th, 2005, 3:25 am

Re: Sometimes: No option to open link to a new tab

Post by dickvl »

(wrong thread)
Last edited by dickvl on December 3rd, 2019, 2:46 pm, edited 1 time in total.
morat
Posts: 6435
Joined: February 3rd, 2009, 6:29 pm

Re: Sometimes: No option to open link to a new tab

Post by morat »

@WaltS48

Here is a code example that creates a click event listener on Walt's avatar that opens the faq page.

Code: Select all

(function () {
  var imgs = document.querySelectorAll('img[src$="1380795_1287423495.jpg"]');
  for (var i = 0; i < imgs.length; i++) {
    imgs[i].addEventListener("click", function () {
      window.location.href = "http://forums.mozillazine.org/faq.php";
    }, false);
  }
})();
You can run the code in the console, then click on Walt's avatar to test.

i.e. Tools > Web Developer > Web Console (Ctrl+Shift+K)

A link uses an anchor element with the href attribute.

http://www.w3schools.com/html/html_links.asp
User avatar
jscher2000
Posts: 11770
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Sometimes: No option to open link to a new tab

Post by jscher2000 »

WaltS48 wrote:
jscher2000 wrote:If you right-click the element and Firefox doesn't show Link-specific items at the top of the context menu, then it is not a link and tricks that work with links are unlikely to work.
How does clicking one of those elements on that site, open the page with a text article along with the image if it is not a link?

JavaScript?
Yes, exactly. For example, window.open() method or location.href = new URL.
Post Reply