Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes closing window automatically using JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "closing window automatically using JavaScript" Watch "closing window automatically using JavaScript" New topic
Author

closing window automatically using JavaScript

avinash narasingam
Greenhorn

Joined: May 08, 2012
Posts: 6
does anyone know how to close the window automatically without having a prompt or alert box .
if we try window.close() a alert box is displayed asking yes or no to close the window
i dont want the confirmation message.
but window should be closed
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

If you didn't open the window yourself, then it's not your window to do with as you please and you can't close it without alerting the user. Why would you want to be so unfriendly?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
avinash narasingam
Greenhorn

Joined: May 08, 2012
Posts: 6
First of all sorry for posting in the wrong forum
Secondly i am the user,when i click on a button(export to pdf) a new window (empty)is opening and also a pdf format page..i just want the pdf page,,
the empty window page should be closed automatically without asking for an alert
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Open the pdf into a hidden iframe.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: closing window automatically using JavaScript
 
Similar Threads
Setting a value to a variable in jsp ..(value is passed by the servlet)
Uploads wait window...
java script
close alert automatically
java script