Problem in window.close() in javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • appandairajc
    New Member
    • Jan 2008
    • 5

    Problem in window.close() in javascript

    Hi All,

    window.close() is not working in firefox browser. Can anybody tell me about this problem?


    Thanks & Regards,

    Appandairaj C
  • kunal pawar
    Contributor
    • Oct 2007
    • 297

    #2
    Window.close() work normally, can u send ur code please.
    So our experts can review it and reply u what exactly problem and its solution

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      It's a setting that can be ignored in firefox, since it's rather annoying.

      As this is a javascript question, I'll be moving it to the correct forum. In the future please try and pick the forum that most directly relates to your question.


      MODERATOR

      Comment

      • npm
        New Member
        • Apr 2007
        • 57

        #4
        Hi
        I've had the same problem and I'm not sure why FF ignores it.

        Here's some code that I've tried to use...it just won't work. The same thing happens when I put the window.close() inside a function and then call it later with a button.

        Code:
        <a href="javascript:window.close();">Close Window</a>
        Thanks!

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          JavaScript can only close windows that were opened using JavaScript. There's a workaround/loophole that may not work anymore in the newer versions of Firefox.

          Comment

          Working...