Web Analytics Made Easy -
StatCounter Want to close Internet Explorer using JavaScript - CodingForum


No announcement yet.

Want to close Internet Explorer using JavaScript

  • Filter
  • Time
  • Show
Clear All
new posts

  • Want to close Internet Explorer using JavaScript

    I have created an application in which i want to give a exit link on which if the user clicks, the Internet Explorer should be closed. Is It possible if yes plz give me the answer (i.e the code) for doing it. It is very much urgent plz ans me...
    New to the CF scene
    Last edited by sonibhavinh; Jun 28, 2002, 03:22 AM.

  • #2
    ans now its urgent...

    i have found the solution for this ie the code goes this way..

    //<a href="javascript:window.close()">Close</a>

    Now, what i want is that after clicking on the "Close" link it prompts me an Internet Explorer message i.e.

    "The Web Page You are viewing is trying to close the Window"
    "Do You Want to close the window"
    "Yes" "No"
    I dont want any message to be displayed or if that can not be possible want to give my own message and than it should not show the above message(default message).


    • #3
      [size=1]<!-- Example written by Zvona -->
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      	<meta http-equiv="content-type" content="text/html;charset=iso-8859-1;">
      <body onload="(document.all)?ikkuna.Click():close();">
      	<object id="ikkuna" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
      		<param name="Command" value="Close">
      From: http://www24.brinkster.com/zvona/htmlexa.asp?article=04
      First Aid for
      Web Design


      • #4
        To Zvona

        The code u have sent to me is calling the function in the body onload. So it dont allow the page to get open and i dont want this. I want is when any one clicks on the link Close it should not display any default IE message and close the Browser or if that is not possible should want to display only my own message. Plz help me...


        • #5

          <OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><PARAM NAME="Command" VALUE="Close"></OBJECT>


          <A HREF="#" onClick="closes.Click();">Exit!</A>

          Quيet Storm Designs ~ Art is not what you see, but what you make others see.
          · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·