Query re new window

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

On my websites, when I click on a link, I am transferred to a new

It is also possible to open the new page but keep the old one open.

Is there a code you can put in the root directory, a bit like
robots.txt to alter this?


Re: Query re new window

On 11/26/2011 11:50 AM, thedarkman wrote:
Quoted text here. Click to load it


Re: Query re new window

"thedarkman"  wrote in message=20

Quoted text here. Click to load it

I think the default behavior of a link is to open a new page that =
the previous one, in the current browser and tab, so that the BACK =
returns to the page where the link was clicked. But on one forum I =
there is an option to open the link in a new tab, or a new window, which =
another instance of the browser. Before tabs were introduced, there were =

only the two choices. I'm not sure what code is involved for these =
but I know you can create a child window, although I think that is yet=20
another option.

I doubt there is any easy way to change the default action of the =
side) browser with a server-side text file. But it may be possible to =
code to the web page that looks for such a file on the server and =
its behavior accordingly, although I think it would be more appropriate =
use a client-side cookie where the user may adjust his/her own =


Re: Query re new window

In article

Quoted text here. Click to load it

You need to put:


in each of your links where you want a new window while keeping the old


"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

Re: Query re new window

Tim Streater wrote:
Quoted text here. Click to load it

Not in my browser. I have it set not to. Doug is correct the answer is "no"

Take care,


Re: Query re new window

On 26-11-2011 17:50, thedarkman wrote:
Quoted text here. Click to load it

No, not in robot.txt file.

Can use a target="_blank" in an anchor.

Or use a jacascript eg.

In the <HEAD> before <BODY>
<script type="text/javascript">
var newWindow
function makeNewWindow1() {
    newWindow =

function closeNewWindow() {
    newWindow = window.close()
    newWindow = null

eg. anchor
<a href="http://url" onClick="makeNewWindow3();return false">blah blah</a>

However a lot of people have in the browser Javascript / pop-up
disabled. They find it very annoying.
So designers are recommended nit to use pop-up scripts.
Edwin van der Vaart

Re: Query re new window

Quoted text here. Click to load it

If you would like to keep the current tab or window open when you click
on a link, then right click on it and choose open in new window or tab.  
Please don't try to force new windows/tabs on your visitors.

Adrienne Boswell
Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info /
The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com /
Please respond to the group so others can share

Site Timeline