Hi
In my application i have two button ok and cancel after clicking the cancel button the window should close automatically.This window is a parent window(not generated by the script).Here i used window.close(). It is working in IE but it is not working in Netscape,Firefox and Mozilla.
window.close is not working in firefox and mozilla browsers
Started by shashi_bi, Jul 15 2005 11:50 AM
4 replies to this topic
#1
Posted 15 July 2005 - 11:50 AM
#2
Posted 15 July 2005 - 02:04 PM
hi,
use self.close();
regards
bvsureshbabu
use self.close();
regards
bvsureshbabu
#3 Guest_shashi_*
Posted 16 July 2005 - 04:42 AM
Hi
I have checked with the self.close() also it is not working.Firefox is generating the error "Scripts may not close windows that were not opened by script."
Thanx
Shashi Kumar Bhandar
I have checked with the self.close() also it is not working.Firefox is generating the error "Scripts may not close windows that were not opened by script."
Thanx
Shashi Kumar Bhandar
#4
Posted 22 April 2006 - 06:53 AM
You must close window which you opened it by: window.open(); only.
#5
Posted 23 December 2009 - 10:58 AM
simplest way is to use this.close() in javascript.
eg.,
<div>
<script type="text/javascript">
function closed()
{
this.close();
}
</script>
<input type="button" value="close" onclick="javascript:closed();" />
</div>
eg.,
<div>
<script type="text/javascript">
function closed()
{
this.close();
}
</script>
<input type="button" value="close" onclick="javascript:closed();" />
</div>
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users













