This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

message/close window

 
Claudia Vaz
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
How cani disable the security message that appears when i do a window.close();
Thanks
Claudia Vaz
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently you can only use window.close() to close windows that were originally opened by JavaScript to restrict the control that scripts have over the browser.
Therefore you don't actually disable the security, you organise it so the security is not a problem.
If you open a new window (window2) from an existing window (window1) then window2 should be able to call close() on itself and window1 should be able to call close on window2, but there is no guarentee that window1 will be able to call close() on itself.
Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic