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>");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top