Suite101

Java script : Window.close


  1. Manish71mishra
  2. PetersWeb
  3. filemanager
  4. ckenned

This archived discussion is "read only".



Top 1.   Jan 30, 2003 11:21 PM

» Manish71mishra - Java script : window.close() - how to avoid the prompt

Hii

when we use window.close in java script, it gives the following msg -

The web page you are viewing is trying to close the window. Do you want to close the window ?

I dont want this msg box to be popped up when window.close is issued.

Would appreciate if any one could help please...

Best wishes
Manish

-- posted by Manish71mishra



Top 2.   Feb 4, 2003 4:18 PM

» PetersWeb - Re: Java script : window.close() - how to avoid the prompt

In response to message posted by Manish71mishra:

It depends on your Browser's security settings so it's in the User's control as to whether they see a message or not. It's a security feature smile

-- posted by PetersWeb



Top 3.   Apr 12, 2003 8:29 AM

» filemanager - Re: Java script : window.close() - how to avoid the prompt

In response to message posted by Manish71mishra:


If that is the only window that's open, windows gives you a default message of "The program blah blah blah... would like to close the window.. "

-- posted by filemanager



Top 4.   Feb 24, 2004 2:41 PM

» ckenned - Re: Java script : window.close() - how to avoid the prompt

This obviously won't work to close the main window you have open, but here's what I use to link to my applications. This allows different business groups in my company to link to my applications without having to use JavaScript. Every application I design, I also make a page called "begin.html" with the following code. begin.html then opens the appropriate page of the application.

window.open('your_url','Page_Name','attributes');

if(window.history.length == 0){
window.close();}
if(window.history.length > 0){
window.history.back();}

-- posted by ckenned



Please follow the guidelines set forth in the Suite101 Posting Etiquette when adding to the discussion.