I suspect I'm out of luck on this one, but here goes...

Say I have a CHM help file that has http:// hyperlinks embedded in the help pages. When the user clicks on a hyperlink of the style:

<a href="http://www.example.com" target="_blank">click here!</a>

a browser window is opened and the target web page is displayed. If a browser is already open a new tab is created and the target displayed in that. If the user clicks on another link (or the same link) another browser window/tab opens, and so on.

Is there any way I can force all clicks of the links to go to the same tab/browser window?

link|improve this question

59% accept rate
No. least, not with anything I am aware of. – soandos Jun 30 '11 at 3:54
4  
Have you tried a different target name? I'm not on a Windows right now (and know nothing about CHM files), but target="foo" in a browser opens a new tab/window the first time, and opens subsequent links in that same window, as it implicitly receives that target name. _blank is a special value that means "always open in new window". – Daniel Beck Jun 30 '11 at 4:00
1  
I tested it in a simple html page, and it works! So I assume it would in a CHM file. – Peter Maxwell Jun 30 '11 at 4:15
I just tested it with Chrome - still opens each click in a new tab. – rossmcm Jun 30 '11 at 4:45
@soandos, @Peter - is this a browser-specific thing then? – rossmcm Jun 30 '11 at 4:52
feedback

1 Answer

Change the value of the "target" parameter to something other than "_blank" (which is reserved by the standards for always opening a new page without a name).

The "target" parameter allows you to specify a name (I recommend using a name that does NOT begin with an underscore) to open the new window in. By using the same name in other Anchor REFerences (hyper-text links), that new window that was opened previously will simply be re-used (instead of opening a new window again).

link|improve this answer
1  
Thanks @Randolf. It seems to work on IE8 but Chrome opens a new tab each time. – rossmcm Jun 30 '11 at 8:39
Internet Explorer 8 doesn't support this? It's a standard feature that all web browsers are supposed to support. Either there's something wrong with IE8 on your computer (most likely, and SpyWare is a logical culprit), or Microsoft has decided that the standards aren't important and decided not to implement this feature (this would cause a lot of problems, so I suspect that they wouldn't dare do this). – Randolf Richardson Jun 30 '11 at 18:44
Hi @Randolf. No, IE does support it. Chrome doesn't appear to. – rossmcm Jul 1 '11 at 5:03
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.