Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Close the browser

Reply
Thread Tools

Close the browser

 
 
Randy
Guest
Posts: n/a
 
      03-29-2005
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


 
Reply With Quote
 
 
 
 
darrel
Guest
Posts: n/a
 
      03-29-2005
> 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


 
Reply With Quote
 
 
 
 
Matt Berther
Guest
Posts: n/a
 
      03-29-2005
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
>




 
Reply With Quote
 
Bruce Barker
Guest
Posts: n/a
 
      03-29-2005
though hopefully, IE will fix this security bug someday.

-- bruce (sqlwork.com)

"Matt Berther" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed). 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
>>

>
>
>



 
Reply With Quote
 
Randy
Guest
Posts: n/a
 
      03-29-2005
Thanks for all the help everyone. That was just the ticket Matt...thanks a
bunch!


"Randy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Matt Berther
Guest
Posts: n/a
 
      03-29-2005

> though hopefully, IE will fix this security bug someday.






 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close a TCP socket? (TCPSocket#close doesn't close it) IƱaki Baz Castillo Ruby 7 01-12-2010 01:32 PM
Browser close event (MSIE and FF): how to detect browser close ? pamelafluente@libero.it Javascript 0 01-23-2007 12:44 AM
Why does JdbcRowSetImpl.close() close the database connection? Paul van Rossem Java 0 04-07-2005 07:01 PM
JavaMail POP3 folder.close() method close also store! Daniel Albisser Java 1 04-07-2004 03:45 PM
How to close child browser while parent close? Denon ASP .Net 1 11-14-2003 08:14 AM



Advertisments