|   Home    |    Excel    |    Access   |   Word   |   Outlook   |   FrontPage   |   VBA   |   Downloads   |   Index   |
Multiple Links...

 

Opening Multiple Links in the Same Remote Window

When you select the first of these links, it will open in a new window. Any of the other links you subsequently select will open in the same new window! Try it out...

Here's the first link.
Here's the second link.
Here's the third link.
Here's the fourth link.

This is a really useful technique to make sure that you don't leave your visitor with multiple open windows. Remember Green's 3rd Rule of Web Design: "Don't annoy the user!"

The trick is to use a special name for the target widow, call it "output".

Here's the code...

<p>Here's the <a href="testwindow1.htm" target="output">first link</a>.
<br>Here's the <a href="testwindow2.htm" target="output">second link</a>.
<br>Here's the <a href="testwindow3.htm" target="output">third link</a>.
<br>Here's the <a href="testwindow4.htm" target="output">fourth link</a>.
</p>

There is a disadvantage though. You will have noticed if you tested the links above that when you returned to this page to click a second link, the pop-up page disappeared behind this one. You would expect it to - it's what windows do. The problem is that when you clicked the link the contents of the pop-up window changed but it doesn't "receive the focus" - it doesn't jump to the front. You might need to remind your visitors to switch windows after clicking a link. If this is a big problem, forget doing it this way and use frames!

Alternatively, you could take a completely different approach and write a JavaScript function (see how I solved the problem when I needed to display a series of different images in the same window).

You will also notice that I haven't specified any special attributes for the pop-up. I could have done but I wanted to keep the code simple.

I've created a demo that puts two windows side-by side so you can see the contents changing. To find out how to control the position and attributes of your windows read the table of attributes on the main New Windows page.

Here's the Remote Links Demo.

 

^ top
   

 

 

 

 

Hit Counter