DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   onclick=window.closw()is not working in mozilla firefox... (http://www.daniweb.com/forums/thread116511.html)

priyamsc Mar 30th, 2008 11:02 pm
onclick=window.closw()is not working in mozilla firefox...
 
hi,
In my internet explorer the onclick =window .close() is working in my home(i have used html control instead of asp control).. but in my office its not working because here we r using mozilla firefox...but here too its working in internet explorer..but i need to show this in mozilla browser
so any one can help me to do this....

SheSaidImaPregy Mar 31st, 2008 11:02 am
Re: onclick=window.closw()is not working in mozilla firefox...
 
you can do window.close, this.close. It won't matter if you place them like this:

onclick="window.close;this.close;return false;"

majestic0110 Mar 31st, 2008 2:48 pm
Re: onclick=window.closw()is not working in mozilla firefox...
 
I wish I had your brain SheSaidImaPreggy lol! was wanting this answer too!

SheSaidImaPregy Mar 31st, 2008 3:15 pm
Re: onclick=window.closw()is not working in mozilla firefox...
 
To avoid errors, you should put it into a function:
function tryClose()
{
Try
{
window.close();
}catch(e){
this.close();
}
}

Hosam Kamel Apr 4th, 2008 8:11 pm
Re: onclick=window.closw()is not working in mozilla firefox...
 
try

javascript:window.open(’javascript:window.close();’,'_self’,'’);

and please refer to this link for more details
http://www.interwebby.com/blog/2006/02/04/3/


All times are GMT -4. The time now is 5:02 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC