• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

closing window automatically using JavaScript

 
avinash narasingam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
avinash narasingam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open the pdf into a hidden iframe.

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