Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Javascript Close Window


26 replies to this topic

#21 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 02 March 2010 - 12:24 PM

Hi

I want to close the current window forcefully without any cinfirmation message.

Please help me >>>>>

Thanks and Best Regards

Hardeep Singh Bhullar

 

 

 



#22 Guest_eric_*

  • Guests

Posted 22 July 2010 - 04:33 PM

None of these examples work for Firefox 3, Chrome 5, or Safari 5.

#23 Guest_Kamlesh_*

  • Guests

Posted 10 November 2010 - 12:35 PM

Definately it will work in firefox. try this code
function closewindow() {
var answer = confirm("Are you sure want to close this window ?");
	if (answer){
		netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
		window.close();
	}
	else{
		stop;
	}
}

View PostiGuest, on 16 July 2008 - 05:33 AM, said:

Why javascript: window.close () is not working in Fire Fox, Is there any solution?
Javascript Close Window

Why javascript: window.Close () is not working in Fire Fox, Is there any solution?



-reply by Samuel


#24 Guest_Antony_*

  • Guests

Posted 14 February 2011 - 05:31 PM

View PostKamlesh, on 10 November 2010 - 12:35 PM, said:

Definately it will work in firefox. try this code
function closewindow() {
var answer = confirm("Are you sure want to close this window ?");
	if (answer){
		netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
		window.close();
	}
	else{
		stop;
	}
}

For this to work we need set change permission on our local browser. This isnt feasible as we cant ask the users of our web application change their security settings. Is there any other solution?

#25 Guest_chandru_*

  • Guests

Posted 08 March 2011 - 12:16 PM

View PostAntony, on 14 February 2011 - 05:31 PM, said:

For this to work we need set change permission on our local browser. This isnt feasible as we cant ask the users of our web application change their security settings. Is there any other solution?

Hi Friends,

Any one got any update on this thread?
How to close the current window in Firefox(3.6.15)?
The window.close() is not working...

netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
window.open(,'_self');
window.close(); unable to trigger force close.

Detecting browser closes in IE and FireFox :D

I incorporate it in my JScript.js and when i use it in a big project and call the javascript function ForceCloseWindow() it did not work :c Error message of e.toString() states that 'A script from "http:" was denied UniversalBrowserWrite privileges.'

My question follows. How can I programmatically enable UniversalBrowserWrite privileges.


Thank you. Please advise.

Chandru P

#26 Guest_Sri_*

  • Guests

Posted 30 November 2011 - 10:07 PM

Hi Friends.

Is there any way i can close all related tabs or windows

window.close() only close the current window or tab but i need to close all the tabs related to that application if they opened.

if they right click on any link and opened in new tab when logout i need to close the other one to

Any please appreciated

#27 Guest_David M_*

  • Guests

Posted 16 December 2011 - 11:48 PM

View Postsomeguy, on 03 November 2005 - 07:28 AM, said:

Hi does anyone have a code to close the browser window. This code needs to be used to close an actual full sized window, not a pop-up window.

SO frustrated with newer browsers being what I assume is secure... or not. On this topic, the only 'solution' I've found is this: make sure the page was opened using JavaScript or even a link ( a href ). This WILL close full-size windows/tabs.

After trying every suggestion in this thread (thank you all for taking the time!), I found that only by opening a window/tab via a link/JS was I able to get the *.close() functionalities to work.

Grr.
David




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users