Close a window after button click

Ask a Question related to ASP.NET, Design and Development.

  1. #1

    Default Close a window after button click

    The user clicks a buuton and the server does some
    processing. If successful I want to close the window.

    Any suggestions?


    Steve
    Steve Guest

  2. Similar Questions and Discussions

    1. Open window on button click
      Hi there, in a form, here's what I want to do : <input type=button onclick= (???) is it possible to open a pop-up window with a specified...
    2. close window component when open with button...
      Hello, I can have a window component popup with actionscript and close just fine. When I have a button that opens the window rather than the window...
    3. want to open a new window on button click!-jscript or javasript
      Hi all... I am able to select a student's story and open it in a word doc. the teacher then corrects the story, highlight in colors the comments,...
    4. Server control button click: open pop up browser window
      Checkout ... ShowModalDialog in the javascript reference. It works quite will if you want to use client side javascript. "Alvin Bruney"...
    5. Button click on Web Dialog opens its copy in new window
      I have an aspx page which I open using the following code fragment below. The modal web dialog has 2 buttons and whenever I click any of them, a new...
  3. #2

    Default Re: Close a window after button click

    you could simply Response.Write the javascript to do a self.close() ala:

    Response.Write ("<script language='javascript'>self.close();</script>")

    A more elegant solution might be to use Page.RegisterStartupScript

    Karl

    "Steve" <stephendotholt@invudotnet> wrote in message
    news:091a01c34077$efeb7fa0$a301280a@phx.gbl...
    > The user clicks a buuton and the server does some
    > processing. If successful I want to close the window.
    >
    > Any suggestions?
    >
    >
    > Steve

    Karl Seguin Guest

  4. #3

    Default Re: Close a window after button click

    Use Page.RegisterStartupScript() to add the following JavaScript to the
    page:

    window.opener = self;
    window.close();

    It will close as soon as it reloads after the PostBack.

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    [url]http://www.takempis.com[/url]
    Big things are made up of
    lots of Little things.

    "Steve" <stephendotholt@invudotnet> wrote in message
    news:091a01c34077$efeb7fa0$a301280a@phx.gbl...
    > The user clicks a buuton and the server does some
    > processing. If successful I want to close the window.
    >
    > Any suggestions?
    >
    >
    > Steve

    Kevin Spencer Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139