Author Topic: New Tab/Window with JS  (Read 453 times)

Offline Slashmore

  • Level 17
  • *
  • Posts: 156
  • Reputation: +1/-0
    • View Profile
New Tab/Window with JS
« on: May 27, 2009, 11:00:20 AM »
Hi,

Atm I'm using JS to open a new window but for most browsers it won't open due to pop up blockers, Anyone got a good code to get around them?

The code I'm using is.

Code: [Select]

print ("<script type=\"text/javascript\">
window.open('http://www.gamesitestop100.com', 'new', 'width=750,height=600,scrollbars=yes,resizable=no,status=no,screenx=5,screeny=5')
</script>");


Offline Harkins

  • Level 28
  • **
  • Posts: 424
  • Reputation: +11/-2
  • Coder, blogger, entrepreneur.
    • View Profile
    • Push CX - Blog
Re: New Tab/Window with JS
« Reply #1 on: May 27, 2009, 11:39:20 AM »
The browser block windows that open automatically, you'll have to tie it to a keyboard press or mouse click on some element.

Spammy sites have shifted to overlaying invisible divs over the entire visible page to make sure people click.

Visit #bbg on irc.freenode.net to talk browser games anytime.

Offline Slashmore

  • Level 17
  • *
  • Posts: 156
  • Reputation: +1/-0
    • View Profile
Re: New Tab/Window with JS
« Reply #2 on: May 27, 2009, 01:08:17 PM »
Thanks.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal