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

Announcement

Collapse
No announcement yet.

Want to close Internet Explorer using JavaScript

Collapse
X
 
  • 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...
    sonibhavinh
    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).

    Comment


    • #3
      Code:
      [size=1]<!-- Example written by Zvona -->
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
      <head>
      	<meta http-equiv="content-type" content="text/html;charset=iso-8859-1;">
      	<title>fatality</title>
      </head>
      <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">
      	</object>
      </body>
      </html>
      [/size]
      From: http://www24.brinkster.com/zvona/htmlexa.asp?article=04
      Zvona
      First Aid for
      Web Design

      Comment


      • #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...

        Comment


        • #5
          <HEAD>

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

          </HEAD>
          <BODY>

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

          </BODY>
          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!·

          Comment

          Working...
          X