Forum Moderators: open

Message Too Old, No Replies

Opening links in a target window

         

Fotiman

3:45 pm on Mar 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have a bunch of "Help" links. These links have a target of "helpwindow". I would expect that when a user clicks one of these links that a new browser window would open with that page. So far, so good. However, if a user clicks the link again, or clicks another link that also has the target "helpwindow", I want it to use the window that it just opened for target "helpwindow", but instead it opens another new window.

Am I doing something wrong?

Thanks.

tedster

12:45 am on Apr 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your expectations are also mine -- in fact, I've used this approach a good bit. I've only run into trouble with spelling inconsistencies and using dashes in the window name, which IE does not like.

I just tested this in IE and it worked for me:

test.html

<html>
<head>
<title>Test</title>
<body>
<a href="test2.html" target="helpwindow">Test 2</a>
<br><a href="test3.html" target="helpwindow">Test 3</a>
</body>
</html>

test2.html

<html>
<head>
<title>Test 2</title>
<body>
Test 2
</body>
</html>

test3.html

<html>
<head>
<title>Test 3</title>
<body>
Test 3
</body>
</html>

The only issue is that the new window loses focus when I click on the Test 3 link in the original window... but the right document loads in the same window. Maybe some other complication in your actual code? This baser bones test case seems to be proof-of-concept.

4hero

8:58 pm on Apr 4, 2006 (gmt 0)

10+ Year Member



and why do you want to open in new windows? It just confuses users... Don't break the back button!

Fotiman

9:28 pm on Apr 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hehehe... I was waiting for this old argument to start up again.

This is an application that has Help links that need to be opened in separate windows (for example, so the user can see the help and the screen at the same time). I agree that for regular navigation, there's no need to "break the back button". :) But for help links, they should be opened in their own window.

Don_Hoagie

2:43 pm on Apr 5, 2006 (gmt 0)

10+ Year Member



and why do you want to open in new windows? It just confuses users... Don't break the back button!

4hero, If you felt the need to hijack this thread in order to condemn the use of new windows, it would've been nice if you had provided something more original than the lame, overgeneralized argument we've all heard six thousand times. Even the way you worded it seems like you just copied and pasted the statement from somewhere.

I'm a user. If i were filling out a form, I'd be majorly pissed if I were directed elsewhere and then had to use the back button to get back to the page I already spent 5 minutes filling out, regardless of whether the information was still there or not.

This thread is about making new windows work, not about whether or not they should be used. Please post something in the Accessibility & Usability Forum if you have something worthwhile to say about that.

Sorry for the rant Fotiman

4hero

2:46 pm on Apr 5, 2006 (gmt 0)

10+ Year Member



Seems I have not got of to a great start on this forum.

Please accept my apologies.