Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Window open

 
Christian Flory
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

it was a few years since I used javascript but for a study i want to use a javascript function, which opens a new window to launch questions for the users, who leave the homepage.

When this function is called on unload, the alert (to test the function) pops up, but the window doesn't - both with IE and FF (although in IE it works locally on my computer !?!):

FF tells me "winout is null winout.focus();"

Here's the code from js-File:



and HTML page:





Thanks in advance.

Chris



 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Modern day browsers block any pop up that is not initiated by a user.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic