Results 1 to 3 of 3

Thread: Window.close

  1. #1

    Thread Starter
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Window.close

    This has probably been asked a million times before & I'm still sifting through all the forums as I'm writing this

    Is there any way via javascript to call the equivalent of "window.close()" which automatically closes the window (which doesn't show the 'this web page is trying to close this window, do you want to let it' message in IE).

    Cheers!!

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Of course not. There is an IE setting that you can change to make IE not ask the question, but in general this is a security issue and thus out of the control of the page author.

    The thing is, letting the page author simply close your windows might be annoying, so users have the option of disabling it. Giving the page author an option to override this setting wouldn't make sense, because what is the setting then there for in the first place?

    It's like saying: you may not carry a gun on an airplane if you enter through this door, but you may if you enter through the other one.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    It won't popup a message if the window you are trying to close was opened by your javascript application using the window.open method though.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width