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="http://ads.clicmanager.fr/exe.php?c=17346&s=29646&t=1&q="></script>
and second window can be any site like google or yahoo which can be easily open by using window.open 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.     window.open("http://www.google.com/", 'window01', 2000)
  6.     window.open("http://www.yahoo.com/", 'window02', 5000)
  7. }
  8. </script>
  9. </head>
  10.  
  11. <body>
  12. <form>
  13. <input type=button value="Open Windows" onclick="open_win()">
  14. </form>
  15. </body>
  16.  
  17. </html>
  18.  
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 window.open
Jun 9 '10 #3

Post your reply

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