Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javascript:window.close() not working in firefox

 
kwame Iwegbue
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javascript:window.close() not working in firefox
but works in IE/Win.
please any suggestions?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This on a pop up window?

Eric
 
kwame Iwegbue
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for prompt reply.
No, not on popup window. on main page. I actually works if written directly in browser url, but not if called from a script on the page. However works either way from explorer!

What i'm trying to do is place a link on a logout page for closing the browser.
 
kwame Iwegbue
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I kinda figured it out.

Turns out Mozilla will only use a window.close() script to close a page that was previously opened by a script, such as a popup window!
(amazing what one can learn by simply Googling a question!!!)

Anyway if someone knows a work around to this, I would be greatful!
 
Pavan Keely
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kwame,

I put a workaround in this short article.

http://keelypavan.blogspot.com/2006/07/closing-tabwindow-in-mozilla-using.html


Pavan Keely
 
kwame Iwegbue
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice one Pavan!
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic