www.webdeveloper.com
Results 1 to 7 of 7

Thread: How to close current running window

  1. #1
    Join Date
    Mar 2006
    Posts
    37

    Exclamation How to close current running window

    hi

    In my project i have to close the current running window when the condition is true how to do it can any one tell me.....

  2. #2
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    If you opened the window then you should have a way of referencing the window to run the corresponding close. If you didn't open it then you can't close it.
    Stephen

  3. #3
    Join Date
    Oct 2005
    Posts
    189
    where u open that window
    use
    Response.Write("<script language='javascript'> { self.close() }</script>");
    ------------------------------------------
    Regards
    Abhishek Goel
    Software Developer in handshakeit (Handshake Infotech Pvt Ltd.)
    ------------------------------------------
    ActiveX controls

  4. #4
    Join Date
    Sep 2005
    Posts
    33

    Enter the Ctrl+Z

    Hi,

    You can enter the Ctrl+Z.


    Thanks
    Dev

  5. #5
    Join Date
    Oct 2005
    Posts
    189
    Quote Originally Posted by hytechpro
    Hi,

    You can enter the Ctrl+Z.


    Thanks
    Dev
    What r u talking abt?????
    ------------------------------------------
    Regards
    Abhishek Goel
    Software Developer in handshakeit (Handshake Infotech Pvt Ltd.)
    ------------------------------------------
    ActiveX controls

  6. #6
    Join Date
    Mar 2006
    Posts
    38
    If it is the window is w/o Frames window.close() will work for ex:
    Code:
    <asp:TextBox OnClick="window.close()">
    If it is the window is w/ Frames top.close() will work

  7. #7
    Join Date
    Aug 2012
    Posts
    1
    Quote Originally Posted by TheLastBurden View Post
    If it is the window is w/o Frames window.close() will work for ex:
    Code:
    <asp:TextBox OnClick="window.close()">
    If it is the window is w/ Frames top.close() will work
    thank you so much @theLastBurden

    so simple and works great!
    this is what i have been looking for, for almost a week!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles