Help getting Firefox to open link in new window


Recommended Posts

I am creating a small web page that MUST open links in a new WINDOW - it is a menu of sorts.

The page works fine in Windows + Firefox with the target = _blank and with Firefox set to "open link in new window"

Exact same setting and web page in Linux does not work - keeps opening new tabs for the target pages.

Anyone have an idea for how to get this to work?

Link to comment
Share on other sites

I think it should be up to the user whether it opens up in a new window or in a new tab. If you say it's a menu of sorts, then I might click more than one link, and I don't want to end up with, say, 6 new windows, all with one tab.

Just something I think you should consider.

Link to comment
Share on other sites

I have my firefox set to open in new tabs by default, so an href with a target="_blank" will open in a new tab. It is how I prefer to operate.

However, I have some pages I run that I want a pop-up window with part numbers to open up when the user clicks a part in the main window. This is done through javascript's window.open that was mentioned earlier.

Here is how I do it. I set up a javacript code before the body:

<script LANGUAGE="javascript">
 <!-- Hide from non-js browsers
  function PartWin(theURL) {
   window.open(theURL,'PartWin','toolbar=no,menubar=no,resizable=no,scrollbars=no,height=200,width=300');
   PartWin.focus();
  }
 -->
</script>

in my case, I had several other attributes decleared to make the window with a specific size and lack of other features like toolbars and scrollbars.

Then, for a URL I want to force open in this window, I make the href call like this:

<a href='java script:PartWin("parts/234-567.htm")'>
(remove the space in "java script" to say "javascript" - see below comment - thanks!)

And it works like a champ!

Edited by markjensen
Link to comment
Share on other sites

Just thought i'd mention, Neowin alters the word 'javascript' to 'java script' if it's got a colon after it, so fix that code if you use it.

Just in case it doesn't work, theres an explanation. :p

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.