Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

How to avoid a new tab in Firefox

Mar 19, 2008 7:41PM PDT

Hi all. I've just come across a problem coding HTML in Firefox and I'm not sure how to get round it.

This is for my own web site, not published on the wen anywhere, just on my own computer. I use frames a lot and I have an <a href></a> anchor that I want to open a new window, and not just a new tab.

The html code I have used before is;
{a href="http://forums.cnet.com/7716-5-0.html" target="_blank"}New posts{/a}
{I had to use curly brackets for this forum as the filter took out the half diamond brackets and the url}.
This is to open a new window for Forum real-time activity.

The "_blank" attribute opens in a new tab. The "_top" attribute blanks out the existing page and opens in that page. How can I force a new window instead of using the existing window? It opens a new window in IE7 but I generally use Firefox.

I prefer a new window because I have two monitors and I drag the new window over to the 2nd monitor. I know I can right click the link and select "New window", but I was hoping to automate it.

Many thanks for any help.

Mark

Discussion is locked

- Collapse -
Threee ways...
Mar 20, 2008 5:27AM PDT

(1) You could either change a setting in firefox to open new windows instead of tabs, but that would apply to EVERY window which is probably not something you're looking for, I just thought I'd throw that out there.

(2) You could hold the SHIFT key and then click the link that has the _blank attribute.

(3) I believe that a javascript could do the trick.

http://www.pageresource.com/jscript/jwinopen.htm

This will open a new window (even in FF), you just have to set the width and height, but since the website is only used on your PC, you can set it just according to your monitor.

~Sovereign

- Collapse -
Perfect the Javascript almost did it for me.
Mar 20, 2008 6:27AM PDT

The Shift+Click works well. I would rather avoid changing Firefox settings.

I was excited by the Javascript prospect but wanted to avoid having a button to click. None of my other CNET links have buttons, just named < a href > tags.

So I tried an amendment,
{ a on Click="window . open(' h t t p://forums.cnet.com/7716-5-0.html?forumID=83','Incoming',
'width=1100,height=750,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,
scrollbars=yes,copyhistory=yes,resizable=yes')" }{ b }{ u }Incoming{ /u }{ /b }

Half diamond brackets replaced by curly brackets

I took out the < Form > tag and just used the onClick attribute, and it works just the way I want it.

Excellent Sovereign, many thanks indeed. Happy

Mark

- Collapse -
(NT) Correction. The Javascript did it for me.
Mar 20, 2008 6:28AM PDT
- Collapse -
You sounded just like me
Mar 22, 2008 6:42AM PDT

You sounded just like me, because when I get something in my head... I have to make it work just the way I want. I figured you would have enough drive to convert the script/html to your liking Silly

~Sovereign

- Collapse -
(NT) Yep, its working fine now.
Mar 22, 2008 8:00PM PDT