Failure in my html commands

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Locked
mlassiter
Posts: 90
Joined: June 27th, 2007, 12:05 pm
Location: San Francisco, CA

Failure in my html commands

Post by mlassiter »

Firefox does not seem to obey one of the html commands in my web page. The command I have is:

<br><font size=-1> <a href="http://forums.mozillazine.org/ucp.php?mode=login" target="_blank">Mozilla Forums Login</a></font>

The part that seems to fail is: target="_blank". It is supposed to open the URL in another window but, instead, it opens in another tab. I have used this for many years under Seamonkey and it has worked correctly. To give Firefox credit, it also does not work in Chrome, Edge, nor Internet Explorer.

Does anyone have a solution ... perhaps a target other than "_blank"?
User avatar
therube
Posts: 21703
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Failure in my html commands

Post by therube »

Check your "link behavior" settings in FF (& Chrome, Edge, IE).

If you have it set to open in a new/current tab, your html code will do that.
If you have it set to open in a new window, your html code will do that.


In SeaMonkey, the Pref is, http://kb.mozillazine.org/Browser.link.open_newwindow.
(Don't know if that is the same in FF?)
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
User avatar
DanRaisch
Moderator
Posts: 127187
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Failure in my html commands

Post by DanRaisch »

Moving to Web Development as the issue appears in browsers other than Firefox.
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Failure in my html commands

Post by jscher2000 »

Here's a test page for experimenting with preferences and the window.open() script command:

https://www.jeffersonscher.com/res/popit.html
mlassiter
Posts: 90
Joined: June 27th, 2007, 12:05 pm
Location: San Francisco, CA

Re: Failure in my html commands

Post by mlassiter »

therube: I could not figure out hot to check my "link behavior" settings. Is this somewhere in the "options" setting?

DanRaisch: I can see that you are able to open a page in a new window but I cannot determine how to have this done by just clicking on a button or making a change to the HTML commands in my web page. Also here is a web site that seems to say that I have set up my HTML commands correctly but Firefox does not handle it properly.
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Failure in my html commands

Post by jscher2000 »

Hi mlassiter, if the user prefers that new windows open in a new tab instead, why not allow a new tab? What's the problem?
mlassiter
Posts: 90
Joined: June 27th, 2007, 12:05 pm
Location: San Francisco, CA

Re: Failure in my html commands

Post by mlassiter »

DanRaisch: I guess I should have described my web page with more detail. My web page is a file on my PC --- no one else has access to it. It consists of around 50 URLs which are my most used bookmarks. So, when I click on one of them, I want it to open (as it used to do in Netscape and Seamonkey) in another new window and not in a tab on the same window as the web page of bookmarks.
User avatar
makaiguy
Posts: 16878
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA
Contact:

Re: Failure in my html commands

Post by makaiguy »

In the old days before browsers started using tabs, the target="_blank" parameter was created to specify that a link should be opened in a new window, instead of replacing the content in the current window.

When tabs were introduced, Firefox's predecessor added a preference you could set for your browser where you could specify you wanted links which would have opened in new windows to be opened in new tabs in the present window instead. This is all or nothing -- all such links will open in either a new window or a new tab, according to the preference you've selected. The only way you can choose for any given link is by right clicking on the link and selecting whether to open in a new window or new tab.

As far as I know, no way ever has been added to HTML to specify whether an individual link is to be opened in a new tab or new window. Your two options are:
  • target="_self" if the link is to replace the contents of the current window or tab. This is the default action if no target value is specified.
  • target="_blank" if the link is not to be opened in the current window or tab.
Doug Wilson
Win10 64bit: FF 115.0.02 64bit, TB 102.12.0 32-bit ║ Android 13/10: FF 115.2.0/115.0.1 ║ No TB for Android available, dammit!
What a fool believes he sees, no wise man has the power to reason away - Doobie Brothers
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Failure in my html commands

Post by jscher2000 »

Hi mlassiter, did you look at my test page that I linked to earlier?

https://www.jeffersonscher.com/res/popit.html

Do you get the third link behaving different from the second link?
mlassiter
Posts: 90
Joined: June 27th, 2007, 12:05 pm
Location: San Francisco, CA

Re: Failure in my html commands

Post by mlassiter »

makaiguy: Thanks. that pretty much tells me that I can't really achieve what I would like. I guess I shall just have to use the "right click" method to get a new window.
Locked