Hello,
I'm trying to find a way to close the browser with out the IE security
message "The Web page you are viewing is trying to close the window."
message. I know how to close the browser using Javascript (window.close() )
but I would not like to get this message.
Is there a way to close it in C#?
Thanks 5 3170
> I'm trying to find a way to close the browser with out the IE security message "The Web page you are viewing is trying to close the window." message. I know how to close the browser using Javascript (window.close() ) but I would not like to get this message. Is there a way to close it in C#?
Controlling the browser is a client-side behavior, so you have to use
javascript. And whether or not you get those types of errors is entirely
dependant on the browser. Typically, you can close any window you open, but
not ones that the user has opened themselves.
-Darrel
Hello Randy,
Prior to calling window.close, set window.opener to a non-null value. Ex:
window.opener = this;
window.close();
--
Matt Berther http://www.mattberther.com Hello, I'm trying to find a way to close the browser with out the IE security message "The Web page you are viewing is trying to close the window." message. I know how to close the browser using Javascript (window.close() ) but I would not like to get this message. Is there a way to close it in C#? Thanks
though hopefully, IE will fix this security bug someday.
-- bruce (sqlwork.com)
"Matt Berther" <mb******@hotma il.com> wrote in message
news:22******** *************** ****@news.micro soft.com... Hello Randy,
Prior to calling window.close, set window.opener to a non-null value. Ex:
window.opener = this; window.close();
-- Matt Berther http://www.mattberther.com
Hello, I'm trying to find a way to close the browser with out the IE security message "The Web page you are viewing is trying to close the window." message. I know how to close the browser using Javascript (window.close() ) but I would not like to get this message. Is there a way to close it in C#? Thanks
Thanks for all the help everyone. That was just the ticket Matt...thanks a
bunch!
"Randy" <te**@temp.co m> wrote in message
news:OY******** *****@TK2MSFTNG P15.phx.gbl... Hello, I'm trying to find a way to close the browser with out the IE security message "The Web page you are viewing is trying to close the window." message. I know how to close the browser using Javascript (window.close() ) but I would not like to get this message. Is there a way to close it in C#?
Thanks though hopefully, IE will fix this security bug someday.
:) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Pack Fan |
last post by:
I've noticed that session variables will persist on Mac IE even after all
browser windows have been closed. One must quit the program to clear the
session variables. This presents a security risk for my session variable
based security scheme.
Basically, the risk is that a user will login to my site, close the window
when done and allow someone else to come up to the machine, go back to my
site and be logged into the previous user's...
|
by: chon |
last post by:
I have an ASP page that is sent a file location as a parameter. It opens
this file, loads the ADODB.Stream object and does a binary write to the page
forcing the download dialog to appear. This all works fine. If the user
selects "Open" or "Cancel", the window closes, which is the desired behavior.
If they select "Save", the location dialog shows up, they save the file and
the window remains open. I've tried a number of things to get...
|
by: Denon |
last post by:
How to trap browser close event in SERVER side?
I read a lot of forum message, it talk about onclose(), onunload() and even
onbeforeunload() event. However, all of theses are based on javascript
written on the client browser , like IE. To send a POST to web server to
acknowledge its close event.
However, I just think, web server and client browser is a TCP connection.
And if the client browser is close and it imply the TCP socket is...
|
by: Gin Lye |
last post by:
Does any one know to close the web browser automatically after logging off
Your help will be appreciated
gin lye
|
by: Ron Lautmann |
last post by:
I want to close a browser window so I created a Close button that does this:
private void Button1_Click(object sender, System.EventArgs e)
{
RegisterClientScriptBlock("GetData","<Script>close()</Script>");
}
But when this runs the browser puts up a dialog box saying: "The web page
you are viewing is trying to close the window, od you want to close this
window?"
| |
by: Paul |
last post by:
Hi I have a web application that has a log off selection, just redirects the
browser to a form with a label displaying you are loging off. In part of the
application I open a new window and was wondering if there is a way to close
all windows associated with the web application when the user selects the log
off selection?
Thanks.
--
Paul G
Software engineer.
|
by: Jan Tovgaard |
last post by:
Hey everyone:)
We have a critical problem, which I can see that other people also has ran
into.
In Internet Explorer 7 it is no longer possible to do a window.close after
opening a window,
without getting a alert message that ask if u want to close the window.
This did NOT happen in Internet Explorer 6, Mozilla firefox or other
browsers.
|
by: Toccoa |
last post by:
After considerable googling - I mean searching with Google(r) - I
could not find javascript on a button or <a href=... to close a
window in the latest versions of IE and FireFox.
There seemed to be two techniques for earlier versions. But the
window.opener='' ;window.close();
and the
window.open('','_parent','') ;window.close();
techniques do not work for me. I.e., I still get confirmation message
|
by: jimmy |
last post by:
Hi all,
I want to capture the event when the browser's close button is
clicked
in an html page.
I tried using the event.ClientX and event.ClientY property in the
body unload event, and this helps to recognise whether the close
button is clicked( also differentiates whethet refresh was clicked).
The problem arises whenever i try to close the window by resizing it
or by right clicking at the bottom of the page and then closing it.
Can...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |