How to close window using javascript in firefox 2.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ssfirstbpo
    New Member
    • Jun 2007
    • 1

    How to close window using javascript in firefox 2.0

    Hi i m trying to close the window in firefox 2.0 using code

    window.open(’’, ’_parent’,’’; }
    window.close();

    i had also tried using code as

    var myWin = window.open('', '_parent','');
    myWin.close();

    but it doesn't seems to work.

    Please help me.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Welcome to TSDN!

    The first line should probably be [CODE=javascript]window.open('', '_parent','');[/CODE]

    Comment

    • arnabc
      New Member
      • Nov 2006
      • 6

      #3
      Originally posted by ssfirstbpo
      Hi i m trying to close the window in firefox 2.0 using code

      window.open(’’, ’_parent’,’’; }
      window.close();

      i had also tried using code as

      var myWin = window.open('', '_parent','');
      myWin.close();

      but it doesn't seems to work.

      Please help me.

      remove "_parent" from the window.open and it should work, you can leave all the three parameters blank. One last thing check u have any pop-up blocker disabled. Put an alert() before closing the window then u can then see the result.

      Comment

      Working...