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. How to find all open browsers ?

How to find all open browsers ?

Scheduled Pinned Locked Moved JavaScript
javascripthelptutorialquestion
9 Posts 4 Posters 7 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.
  • I Offline
    I Offline
    InderK
    wrote on last edited by
    #1

    Hi All, Can anyone please let me know how we can find all open browsers with the help of Javascript? Please help. Thanks a lot. Thanks, Rajinder

    P N 2 Replies Last reply
    0
    • I InderK

      Hi All, Can anyone please let me know how we can find all open browsers with the help of Javascript? Please help. Thanks a lot. Thanks, Rajinder

      P Offline
      P Offline
      Prosanta Kundu online
      wrote on last edited by
      #2

      You cannot find all the open browsers using javascript. You can use Navigator object for getting information about vistor's browser. Check this [http://www.w3schools.com/js/js_browser.asp]. Provide more information about your requirement.

      I 1 Reply Last reply
      0
      • P Prosanta Kundu online

        You cannot find all the open browsers using javascript. You can use Navigator object for getting information about vistor's browser. Check this [http://www.w3schools.com/js/js_browser.asp]. Provide more information about your requirement.

        I Offline
        I Offline
        InderK
        wrote on last edited by
        #3

        Hi, Thanks for our reply. My requirement is to close all the open pop-up windows when user click log-out or close the application parent window. The problem is that I can not change all the pages of application 'coz if I change all the pages of my application then I have to change around 1000 pages. I am trying to findout some solution which I can apply on the logout link or onunload of main window, to close all the opened pop-ups. As we can find out the URL of browsers with "document.location.href", so I was thinking that if there is any way to find out all the open browsers and then get the URL of all the open browsers and then close all the browser whose URL starts with my domian name (let say kamboj.com). Please help me to find out solution for this. Thanks, RK..

        T 1 Reply Last reply
        0
        • I InderK

          Hi All, Can anyone please let me know how we can find all open browsers with the help of Javascript? Please help. Thanks a lot. Thanks, Rajinder

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          You asked this a few days ago. http://www.codeproject.com/Messages/3556165/Re-How-to-close-all-pop-up-on-click-on-logout.aspx[^] Please do not continue to repost the same question. Especially when you have received answers to the original question.


          I know the language. I've read a book. - _Madmatt

          I 1 Reply Last reply
          0
          • N Not Active

            You asked this a few days ago. http://www.codeproject.com/Messages/3556165/Re-How-to-close-all-pop-up-on-click-on-logout.aspx[^] Please do not continue to repost the same question. Especially when you have received answers to the original question.


            I know the language. I've read a book. - _Madmatt

            I Offline
            I Offline
            InderK
            wrote on last edited by
            #5

            Hi Mark, I am not posting the same question. I know I asked this few days back but I have not find out the soluation. SO I am sharing what I am thinking off to find the solution. It might be possible that some one got some clue from the logic which is running in mind and can come up with some solution. I hope to get something from you guys. Cheers, RK..

            N 1 Reply Last reply
            0
            • I InderK

              Hi Mark, I am not posting the same question. I know I asked this few days back but I have not find out the soluation. SO I am sharing what I am thinking off to find the solution. It might be possible that some one got some clue from the logic which is running in mind and can come up with some solution. I hope to get something from you guys. Cheers, RK..

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              From 14:01 4 Aug '10: "I want to close all the pop-up windows if user click on log out link..." From 50mins ago: "My requirement is to close all the open pop-up windows when user click log-out..." From 0:07 5 Aug '10 "I mean of not change existing modules means I can not change each and every program..." From 50mins ago: "The problem is that I can not change all the pages of application..." Looks like a repost to me. Just because you changed the wording a little doesn't make it new or different.


              I know the language. I've read a book. - _Madmatt

              1 Reply Last reply
              0
              • I InderK

                Hi, Thanks for our reply. My requirement is to close all the open pop-up windows when user click log-out or close the application parent window. The problem is that I can not change all the pages of application 'coz if I change all the pages of my application then I have to change around 1000 pages. I am trying to findout some solution which I can apply on the logout link or onunload of main window, to close all the opened pop-ups. As we can find out the URL of browsers with "document.location.href", so I was thinking that if there is any way to find out all the open browsers and then get the URL of all the open browsers and then close all the browser whose URL starts with my domian name (let say kamboj.com). Please help me to find out solution for this. Thanks, RK..

                T Offline
                T Offline
                T M Gray
                wrote on last edited by
                #7

                Are you using window.open in the same way every time? Are you using .js files? If you have a site with 1000 pages and didn't use something like includes, master pages or some other templating mechanism you need to go slam your hand in a door and with your broken fingers write out "I will think about maintainability" a million times.

                I 1 Reply Last reply
                0
                • T T M Gray

                  Are you using window.open in the same way every time? Are you using .js files? If you have a site with 1000 pages and didn't use something like includes, master pages or some other templating mechanism you need to go slam your hand in a door and with your broken fingers write out "I will think about maintainability" a million times.

                  I Offline
                  I Offline
                  InderK
                  wrote on last edited by
                  #8

                  Hi Gray, We have 1000 pages and we are using .JS files and some include files as well, So I guess I do not need to slam my hand in door and do not need to write with broken finger... :laugh: SO do you have any soluation for this now? :)

                  T 1 Reply Last reply
                  0
                  • I InderK

                    Hi Gray, We have 1000 pages and we are using .JS files and some include files as well, So I guess I do not need to slam my hand in door and do not need to write with broken finger... :laugh: SO do you have any soluation for this now? :)

                    T Offline
                    T Offline
                    T M Gray
                    wrote on last edited by
                    #9

                    var openWindows = new Array();
                    window.openCustom = function(){
                    openWindows.push(window.open(arguments[0],arguments[1],arguments[2]));
                    }

                    Global search and replace window.open with window.openCustom. Then in your unload handler loop through openWindows. If you leave windows open and refresh the main page then you need to use an XMLHTTPRequest or some other callback mechanism to store the open windows on the server so it can be reloaded on postback.

                    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