Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 148165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:54:35+00:00 2026-05-11T08:54:35+00:00

Is it at all possible to disable the The webpage you are viewing is

  • 0

Is it at all possible to disable the ‘The webpage you are viewing is trying to close the window. Do you want to close it?’?

I understand that this is the product of years of virus, and malicious script activity, but in legit app code, (ASP.NET), is there any way to like ‘register’ your app as an APP, or flags you can pass to an IE Popup so that it will not display this when it closes?

The code I’m using is done from within the C# code behind:

ClientScript.RegisterClientScriptBlock(GetType(), 'save', Utils.MakeScriptBlock('window.close();'));  

The Utils.MakeScriptBlock is just a function that does what you might expect. It ‘injects’ a <script…> tag with the code in it…

It’s probably not possible to get around this, or else, all the script kiddies would just use that trick, but I thought I’d ask, as I can’t be the ONLY one using simple IE ‘popups’ as (pseudo)modal dialog boxes.

This code happens in my ButtonSave_Click() routine, after everything has passed validation, etc…

** EDIT **
Just for reference, here is the code that OPENS the popup, when the ADD button is clicked:

This is in Page_Init()…

ButtonAdd.Attributes.Add('onclick', 'window.open('Add.aspx', 'ADD_WINDOW', 'scrollbars=no,width=550,height=550,location=no,menubar=no,resizable=yes,directories=no,status=no,toolbar=no'); return false;'); 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T08:54:36+00:00Added an answer on May 11, 2026 at 8:54 am

    You can close the window without the popup if the window was opened by your script. Does that help?

    Edit: You’re already opening the window with script. Change your client script to call self.close().

    ClientScript.RegisterClientScriptBlock(GetType(), 'save', Utils.MakeScriptBlock('self.close();')); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Would it be possible to disable javascript in a website that you are trying
Is it possible to disable all authentication in a subfolder of a web site
Is it possible to disable all the I/O ports of the Windows PC my
I am trying to load a html page through UIWebview.I need to disable all
I wondered if it is possible to disable/override all authorization attributes. On the development
Is it possible to disable the Select all button in the upper left corner
In the powerful logging built-in module in Python, it is possible to disable all
is it possible to disable validation of all items inside a panel programatically in
is it possible to disable all Toasts in an Activity? I use an Library
Is it possible to disable/remove all mapping/commands in order to remap them all from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.