July 11th, 2003, 03:21 PM
Okay, I have a feeling I already know the answer to this, but I will ask just in case I am working on out-dated info...
To open an html link in a new window, say foo.html, one would write the code
<a href="foo.html" target="_blank">. Is there a way to control the properties of this new window (such as height, width, etc)?
July 11th, 2003, 04:17 PM
The answer is no, but you can do the following, which will continue to allow the search spiders to follow the particular URL.
The other nice advantage to this is that those w/o JS enabled will still be able to follow the link as well.
<a href="foo.html" onclick="window.open(this.href,'newWindow');">
July 11th, 2003, 04:32 PM
Thanks for the tip, but the is still the problem of the parent changing as well. Any ideas to something that could be added in the onClick handler to cause the parent to stay put?
July 11th, 2003, 05:42 PM
Good ole' return false...
<a href="foo.html" onclick="window.open(this.href,'newWindow'); return false;">