Click to See Complete Forum and Search --> : Using OnClick=""


Vasilli
10-07-2003, 04:03 AM
Hi all

Just a quick and simple one

i want to make my onclick="" open in a new window like the target="_Blank" does

onClick="window.location.href='http://www.MySite.com'" open in a new window

Thanks for the help

Jono

Charles
10-07-2003, 05:04 AM
<a href="http://www.w3.org/" onclick="window.open(this.href, 'child', 'height=400,width=300'); return false">W3C</a>

It's important to make sure that the link will still work for the 13% of users who do not use JavaScript and see http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/window.html#1202731 for details concerning the use of the "window.open()" method.

Vasilli
10-07-2003, 06:23 AM
Thanks mate

In the mean time i remembered about the window.open() command.

Thanks again

Jono