/    Sign up×
Community /Pin to ProfileBookmark

Forcing New Tabs/Windows in Firefox

Hi All,
I have a question so simple I’m almost too embarrassed to ask…

I have a link that’s supposed to open an invoice in a new tab or window (for printing).

In IE, this works…
<a href=’myprintpage.php’ target=’invoice’>

When ‘invoice’ doesn’t exist, IE simply opens it as a new tab or window (depending on settings).

In Firefox, it opens the link in the same window. (Note that I don’t want to use pop-ups.)

Any suggestions for a solution?

CTB

to post a comment
HTML

8 Comments(s)

Copy linkTweet thisAlerts:
@CentauriNov 09.2007 — [CODE]<a href="myprintpage.php" onclick="window.open (this.href, ''); return false">Link Text</a>[/CODE]
Copy linkTweet thisAlerts:
@bathurst_guyNov 09.2007 — target="_blank"
Copy linkTweet thisAlerts:
@CentauriNov 09.2007 — target="_blank"[/QUOTE]

Ok with a transitional doctype - won't validate with strict.
Copy linkTweet thisAlerts:
@kiwibritNov 09.2007 — Ok with a transitional doctype - won't validate with strict.[/QUOTE]

True. But it will work on every browser I can think of - and provided there is a comment about a new window or tab, I don't see an accessibility issue.
Copy linkTweet thisAlerts:
@chestertbauthorNov 09.2007 — hmmm... none of these solutions work in Firefox. All work in IE. :-(

So I looked further and discovered that Firefox's default state is to open "javascript pop-ups" in the current tab. I'm not using pop-ups, so it looks like it defaults to include all targets. When I switched that off, all solutions, including the original "target='invoice'" worked. It does, however, open in a new window rather than a new tab... that is, it opens a second instance of Firefox for the target. Form a practical perspective, that doesn't really matter all that much, but it is a little annoying.

Thanks for your help all. I'm sorry it wasted everyone's time.

PS... I know it's built using IE's engine (oft described as "evil" in these parts), but Crazy Browser's default multi-tab useability just runs rings around Firefox. It's a pity it's becoming a little unstable.

Cheers

CTB
Copy linkTweet thisAlerts:
@KravvitzNov 09.2007 — There are a few extensions that allow you to change the behavior of tabs in FF.

[url=https://addons.mozilla.org/en-US/firefox/addon/158]Tabbrowser Preferences[/url]

[url=https://addons.mozilla.org/en-US/firefox/addon/1122]Tab Mix Plus[/url]
Copy linkTweet thisAlerts:
@Major_PayneNov 09.2007 — FF itself has a way to control tabs under the Tab tab without needing extensions. Don't forget FF version 2.0.0.9 is out and these new versions are always bug fixes and/or security fixes.

Ron
Copy linkTweet thisAlerts:
@felgallNov 09.2007 — Since your visitor has full control over whether links open in a new window or new tab or in the current window, you can't force a page to open a specific way.

I have my browser configured to open ALL pages on the same site in the same window and all links to pages on a different site as a new tab regardless of how the web page itself is coded.
×

Success!

Help @chestertb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...