Why some weblinks/buttons can't be opened in new tab or window?

In some links in some websites, if you right click the link, you are not able to “open in a new tab.”

One common example: Gmail. It is very difficult to open more than one email because you cannot right click an email and open them with another window or tab.

Another example that is even less consistent: Scottrade. You can “open in a new tab” any of the links in the bar on the left, but you can’t do this for any of the links at the top of the page.

Why do web developers do this? I can’t believe they do not know what they are doing, that is their job. If they are doing this intentionally, it can easily be circumvented with a little work (e.g. By duplicating tabs and then clicking links).

The buttons and links you are clicking on probably aren’t actual links, regardless of how they look. They are objects with functions attached to them, and the functions give the directive to show a different page…or not even a different page, just change the objects shown on the current page.

All the browser can do is interpret hyperlinks written as hyper links (<a href=“page.html”>) and give you the menu option to open the href value of the hyperlink in a new tab or window.

If a “link” or a button does not have an actual hyperlink attached to it, the browser can’t give you the option to open it in a new tab or window.

For example, the “Go” button at the bottom of this page is a button you can click to take you to a new page, but you can’t right-click and “open in a new window” because it’s not a link, it’s a functional button. You can program text to look like links but function like a button, too.

To be fair, a browser could give you the option to open another tab, clone the current tab, then click the link in the new tab.

There are even browser extensions that will add this behavior, I believe.

The problem with that is that it depends on the underlying data model of the site in question. If the site doesn’t expect you to have two tabs open, then clicking on things in one tab can change the underlying state in another tab, which might lead to strange behavior.

ZipperJJ, why can’t the browser just give you the “open in a new tab” option for buttons also? Why be limited to links?

A link is a pointer to a valid (presumably) URL that the browser can just hand off to a process to display. A button may perform a function that doesn’t result in any HTML, it may do something behind the scenes, or do nothing at all. What are you going to display in those cases?

A typical example would be a button that calls a javascript function. What does that function do? Does it open a link? Does it launch an angry bird? Does it play William Tell’s Overture? Does it do something else entirely? Scripts can do an awful lot of things other than just open links and the browser has no way of knowing what this one does. The only thing the browser can do is call the script.

It’s possible the browser could clone the webpage, then send the button click in the new copy (but not in the original).

But then it goes back to, if the website’s data model easily supported the button being treated as a link, the button would probably already be a link. Web developers don’t do things like that just to be jerks.

AND furthermore, you could have a Submit button in a form.

I run my browser with JavaScript disabled most of the time. So about that “Go” button at the bottom of the SDMB thread page? (The “Forum Jump” option.) It’s clearly not a link. And it can’t be a JavaScript thing, because it still works for me even though I have JavaScript disabled.

Answer: A quick look at the Page Source (Control-U in many browsers) shows that it’s the Submit button of a form as coded like this:</select><input type=“submit” class=“button” value=“Go” />So that’s not right-clickable either.