[thelist] JavaScript window.open and alternative

Tim Beadle Tim.Beadle at iop.org
Mon Aug 23 05:04:29 CDT 2004


thelist-bounces at lists.evolt.org wrote on 21/08/2004 00:24:34:
> Forget the document.write() stuff.
> 
> You can do this:
> <a href="yourUrl.html" target="_blank"
> onclick="window.open(...);return false;">Your link</a>
> 
> That should do the trick.

Another piece of the puzzle: instead of repeating the link, you can 
reference it using this.href, thus:

<a href="yourUrl.html" target="_blank" onclick="window.open(this.href, 
...window options...)">Text</a>

Tim



Institute of Physics
Registered charity No. 293851
76 Portland Place, London, W1B 1NT, England

IOP Publishing Limited
Registered in England under Registration No 467514.
Registered Office: Dirac House, Temple Back, Bristol BS1 6BE England

This e-mail message has been checked for the presence of computer viruses.



More information about the thelist mailing list