window close ?

  • Thread starter Thread starter Jarod
  • Start date Start date
J

Jarod

Hey
Is there any way to asp.net generate window.close() - javascript function ?
I need to close user window if he doesn't have access to the page.
Jarod
 
Sure, Response.Write("<script>window.close()</script>");

Note, that if the program is trying to close the main window, as opposed to
other windows opened from the main one, the browser will ask the user for
confirmation.

Eliyahu
 
Sure, Response.Write("<script>window.close()</script>");

Note, that if the program is trying to close the main window, as opposed
to other windows opened from the main one, the browser will ask the user
for confirmation.

Response.Write("<script>window.opener=null;window.close();</script>");
 
Back
Top