Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing Browser

Status
Not open for further replies.

Danielvb

Programmer
Oct 8, 2002
34
US
Hello everyone

Please I need help. I am writing some asp pages and it must be tested in Nestscape and IE.

One of the active server pages has a image that said [ Close Browser ].

Questions:

I am looking for a code in VBScript to close the browser.


If not, Can you guide me with some javascript code how to close a browser using an image. [CloseBrowser.gif ]

Thanks to all for your help

Daniel
Hollywood, FL
 
Hi ...
first of all, you can not close a browser which you just opened it by running IE.
you can olny close the browser which were opened by an other browser(window.open method in javascript.)
in otherway, when you want to close the browser, a message will appear for confirming the close process.

and here is the code :

<script language=&quot;javascript&quot;>
function close_window(){
window.close;
}
</script>


<a href=&quot;javascript:close_window();&quot;><img src=&quot;CloseBrowser.gif&quot; border=&quot;0&quot;></a>
----
TNX.
E.T.
 
Hi ehsant

Thanks a lot for your tip. It works fine


Daniel
Hollwyood,FL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top