by Jocelyn Kinnear
email this articleSummary : Let's create a custom script for your website that will allow you to open your link in a new window, properly.
Here is an easy way to open a browser in a new window with JavaScript. You might find it convenient to use something like the "target" attribute; however, this attribute is deprecated and shouldn't be used. Unlike the target attribute, you can specify the width and height of the window you are opening using the following method.
<a href="javascript:void(0)" onclick="window.open('http://www.bravenet.com','Bravenet.com','width=200,height=200')">
Open a New Window
</a>
Customize the Script for Your Site:
Once the code is edited, you can place it anywhere in the body of your webpage. This code can be very helpful if you want to open a small window for something such as an image gallery.