Surely you've stumbled upon one of those sites that open up all kinds of new browser windows on your screen. "Please take our survey" or "Please visit our sponsor." It can be annoying when it's not expected, because it often turns into a game of Whack-a-Mole with close buttons.
People don't like new windows with extraneous garbage in them, but in some cases it's advantageous to open up a new browser window:
My only rule for making new browser windows is this: They should contain the main content of a site. If you set your site up to open a window from the start, and if everything happens within that window, people won't have a problem with it. But if a new window is just there to hold "extra stuff", consider integrating the extras into the main content window, or getting rid of them altogether (who needs extra bits anyway?). If you're trying to put advertisements into a new pop-up window, how about trying a different technique? Pop-up ads will send people away from your site in droves. (I'm not trying to lay down the law here, I'm just telling it like it is...)The easy way to open new windows:
If you just want another window for a link, without any special features, you can do it within the link tag itself:
<A HREF="http://www.somesite.com" TARGET="whatever">Check this out</A>
Here's a link that uses this method to open my personal web site in a new window. Browser windows actually have names. The TARGET="whatever" option triggers the creation of a new window called "whatever". If you have more links that you want to send to the same new window, you could use TARGET="whatever" on those as well.
(of course, you should replace the above "http://www.somesite.com" with the URL of your own link)Getting more interesting:
Now that you have the code, you can modify it to your liking. Don't worry about the size of the window or the URL it will load yet-- you'll specify those later. For now, you can modify the options on the lines that start with window.open. The options are: scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0. These options should be pretty self-explanatory, but if you don't understand what they do, you've got a good excuse to experiment with them.
To get you started, scrollbars=0 turns off (0) the scrollbar on the right side of the browser. SO if you actually want those scrollbars in your new window, simply change the option to scrollbars=1. Remember to change options in both lines that begin with window.open, not just the first one.OK, OK, but how do I actually open a new window?