The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

5 pop-ups

I would advise not to open any pop-ups let alone 5 There is a reason pop-up blockers are popular. And I don't see why a user would necessarily want to see all 5 band sites, especially at once, even with a broadband connection.
The best would probably be to give them the choice. eg.

I would advise not to open any pop-ups let alone 5 There is a reason pop-up blockers are popular. And I don't see why a user would necessarily want to see all 5 band sites, especially at once, even with a broadband connection.
The best would probably be to give them the choice. eg.

The syntax for opening a window in JavaScript is:
window.open("URL","window_name","feature_list")

The feature list can have things such as height=400,width=600,~etc..

To get 5 windows, simply rinse and repeat.

Notes: Variable substitution may be implemented instead of literal strings and loops may be instituted for repetition. If you use the same window name, however, the new URL will simply replace the old in the same window. Most common is to assign the window.open result to a variable name, as in: winX=window.open(~etc.) as the window may then be manipulated through the variable.

Hopefully everyone will be running a decent popup blocker that blocks such stupid code from working. Decent popup blockers will allow ONE popup window to be opened in response to a specific request to open it by your visitor.

To get the window.open to open multiple windows the window name must either be different for each wildow or set to _blank

pop-ups

Originally Posted by martynjackson

My users want this

There may be some users that aren't smart enough to realize exactly what they're asking for. So even though you know better, do you give it to them anyway? I suppose as long as the link clearly warns users and you provide another alternative for the users that aren't asking for this "feature", then you should minimize the risk of losing your visitors.

Opera does that, but FF and Konq do not with the following code: <a href="#" onclick="window.open('','','height=200,width=300,top=200');window.open('','','height=200,width=300,top=400');return false;">test</a>

So, as with pornography, I guess decency is in the eye of the beholder.