wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Window open Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Window open " Watch "Window open " New topic
Author

Window open

Christian Flory
Greenhorn

Joined: Jun 01, 2012
Posts: 1
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
Modern day browsers block any pop up that is not initiated by a user.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Window open
 
Similar Threads
javascript error... plz help
Loading Progress Bar
Java cookies ?
Pop up calendar Problem
How to stop opening a new Window in IE(Urgent !!!)