By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,881 Members | 648 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,881 IT Pros & Developers. It's quick & easy.

Open 2 windows on 1 click

P: 13
I want to open 2 windows on 1 click. 1st window is a javascript banner code i.e.
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" src=""></script>
and second window can be any site like google or yahoo which can be easily open by using but I want to open both windows on one banner click and the banner is in the first javascript.

Wheneven someone clicks on banner, i want 2 windows to be open, first will be the ad window and second will be my own window (google/yahoo etc).
Jun 8 '10 #1
Share this Question
Share on Google+
2 Replies

P: 4
Will this work for you?

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function open_win() {
  5."", 'window01', 2000)
  6."", 'window02', 5000)
  7. }
  8. </script>
  9. </head>
  11. <body>
  12. <form>
  13. <input type=button value="Open Windows" onclick="open_win()">
  14. </form>
  15. </body>
  17. </html>
Jun 8 '10 #2

P: 13
As you can see, my one website is not a website, it's a javascript banner code so I cannot open it with
Jun 9 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.