Close IE

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

I have a request from a user:
He wants a close button on the webpage and when he clicks on the button he wants IE to close.

How would you do this?
And is this a good idea?

Thanks


Peter
 
Peter,

Button1.Attributes.Add("onClick", "javascript:window.close();"

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
I have a request from a user:
He wants a close button on the webpage and when he clicks on the button he wants IE to close.

How would you do this?
And is this a good idea?

Thanks


Peter
 
<input type="button" onClick="self.close()">


I have a request from a user:
He wants a close button on the webpage and when he clicks on the button he wants IE to close.

How would you do this?
And is this a good idea?

Thanks


Peter
 
You cannot close IE from a button on a page.
You *can*, however, close a page from a button on it.




Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
I have a request from a user:
He wants a close button on the webpage and when he clicks on the button he wants IE to
close.

How would you do this?
And is this a good idea?

Thanks


Peter
 
....and since that page exists in a browser window, the browser gets closed
as a result.
 

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