Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Disable Tabbed browsing using javascript

Disable Tabbed browsing using javascript

Scheduled Pinned Locked Moved JavaScript
javascript
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    manowj
    wrote on last edited by
    #1

    Hi Everyone, Is it possible to close all tabs in the browser using javascript in IE7 & Firefox. Please let me know if anyone has the code. Thanks in Advance.

    Regards, Manowj

    Steve EcholsS 1 Reply Last reply
    0
    • M manowj

      Hi Everyone, Is it possible to close all tabs in the browser using javascript in IE7 & Firefox. Please let me know if anyone has the code. Thanks in Advance.

      Regards, Manowj

      Steve EcholsS Offline
      Steve EcholsS Offline
      Steve Echols
      wrote on last edited by
      #2

      I don't think you can close tabs you didn't open through javascript (imagine the havoc that would cause, if every web page you went to closed all your other tabs). If you did open it (using window.open()), you can close it using window.close() or self.close().


      - S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.

      • S
        50 cups of coffee and you know it's on!
        Code, follow, or get out of the way.
      M 1 Reply Last reply
      0
      • Steve EcholsS Steve Echols

        I don't think you can close tabs you didn't open through javascript (imagine the havoc that would cause, if every web page you went to closed all your other tabs). If you did open it (using window.open()), you can close it using window.close() or self.close().


        - S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.

        M Offline
        M Offline
        moocr com
        wrote on last edited by
        #3

        Yes, you are right! javascript can not close a window without any confirm or alert if it did not open the window use window.open(); moocr.com

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups