Important alert: (current site time 7/15/2013 11:56:44 AM EDT)
 

winzip icon

Window Close Without Alert Message

Email
Submitted on: 4/28/2002 2:45:05 PM
By: Rahul Mahajan  
Level: Advanced
User Rating: By 47 Users
Compatibility: JavaScript
Views: 71369
author picture
(About the author)
 
     Close the Window (Main) without any confirmation message. No need to open a new full screen Window or new popup Window. Both IE & NS scripts are written differently. If you like the script then please rate it.
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 5 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
4/28/2002 4:16:08 PMNamita

Thank you. I used your script for my project work.
(If this comment was disrespectful, please report it.)

 
4/29/2002 7:53:21 AMRonnie

Nice Try. Although there is no need for giving this option to a user. But still you have created something new.
(If this comment was disrespectful, please report it.)

 
4/29/2002 2:05:20 PMYogesh

Hi Guy! The script is excellent. My vote for you is 5. Thanks for sharing.
(If this comment was disrespectful, please report it.)

 
4/29/2002 3:55:15 PMAlisha

Giving you 5 globes for your creativity. Send me your new script next time.
(If this comment was disrespectful, please report it.)

 
4/30/2002 8:36:32 AMkrishanan

Very clever.
(If this comment was disrespectful, please report it.)

 
4/30/2002 7:39:58 PMSheffali

I agree with the above guy. The script is written very cleverly. 5 globes from me.
(If this comment was disrespectful, please report it.)

 
5/1/2002 2:24:34 PMdinesh mathur

Top stuff!
(If this comment was disrespectful, please report it.)

 
7/10/2002 6:22:08 AMJuan

Excellent piece of code. But i'd like to know how it works !
(If this comment was disrespectful, please report it.)

 
7/26/2002 7:57:08 AMAnurag

Hi Rahul

Due to some reasons, I cannot download the zip file contaning code for closing windows without alerts.

Can you please send the same to me as plain text.

My email id: anurags_11@yahoo.com


Thanks in advance,

Anurag
(If this comment was disrespectful, please report it.)

 
7/26/2002 7:59:05 AMAnurag

Hi Rahul

Can you please send this code (for closing windows without alerts) as plain text to me.

My email id: anurags_11@yahoo.com


Thanks in advance,

Anurag

(If this comment was disrespectful, please report it.)

 
11/23/2002 1:11:00 AM

Hi Rahul,
Thanks for your code.It doesn't work on IE6.0 and SP1. Any work arounds will be welcome.Personal mail -vasanth_vk@yahoo.com
Regards,
Vasanth
(If this comment was disrespectful, please report it.)

 
9/5/2003 9:19:06 PMMark Kahn

doesn't work in new IE versions.
(If this comment was disrespectful, please report it.)

 
10/17/2003 12:11:51 AMJames Smith K

Hi Rahul
Ur script works in IE 6.0 too.. thats grt , Good Luck
Regards
James Smith


(If this comment was disrespectful, please report it.)

 
1/26/2004 8:35:36 PM

Try above code ....it Works great.
(If this comment was disrespectful, please report it.)

 
7/7/2004 11:26:46 AM

Hello Hi Rahul,

I'm trying to use your code but it gives me an alert message that it only works in Explorer Help. I am use IE 6.0
(If this comment was disrespectful, please report it.)

 
8/27/2004 12:33:19 AMAnkur Arora

THIS CODE IS NOT WORKING IN IE 6.0 WITH SERVICE PACK 2. GIVING ERROR "THIS OPERATION CAN ONLY FUNCTION WITH HTML HELP". SO PLEASE CHECK IT ON IE 6.0 THEN SAY THAT THIS ONE IS THE BEST. IF YOU NEED THIS BEST ONE GO HERE
//---------------------------------
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4361&lngWId=2
(If this comment was disrespectful, please report it.)

 
1/31/2005 9:57:55 AMmohan sri

yea it works in IE 6.0 with service pack 1
its great really
(If this comment was disrespectful, please report it.)

 
5/17/2005 6:29:48 PMTittle Joseph

I'm getting error 'works within html help', seems like Microsoft improving their IE loopholes, everytime they release a new version. Because I had seen something like 'self.opener=null' and 'self.opener=this' working earlier for the same, but now this too dont work. So this code is obselete as of today :(
(If this comment was disrespectful, please report it.)

 
1/11/2006 3:44:51 PMRahul Mahajan

The code is running on the following URL -
http://mdwebtechnologies.noads.biz/windowclose.html
(If this comment was disrespectful, please report it.)

 
2/3/2006 10:48:35 AMRajeev K Arora

Tittle Joseph is right. Window does prompt this message of 'Works in Html Help'. But here is the easier method of closing IE window without prompt which I found at http://www.ozzu.com/ftopic901.html----
window.opener = null
window.close()
return false
(If this comment was disrespectful, please report it.)

 
3/15/2006 6:59:16 AMkmc

Rajeev's code is GREAT, thanks
(If this comment was disrespectful, please report it.)

 
5/1/2006 8:49:24 AMTittle Joseph

I tried this and it worked.
window.opener=null;self.close();
(If this comment was disrespectful, please report it.)

 
11/5/2007 1:55:31 AMBino B

Rahul good post.
btw most of the links mentioned in the feedbacks are not functioning now.And the few doesnt effective in FF.
(If this comment was disrespectful, please report it.)

 
3/10/2009 1:38:18 PMAJINKYA

HEY RAHUL,
HOW TO RUN

(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.