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:window.close()

javascript:window.close()

Scheduled Pinned Locked Moved Web Development
javascript
6 Posts 3 Posters 0 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.
  • V Offline
    V Offline
    vanhawk
    wrote on last edited by
    #1

    Does the javascript:window.close() closed the session. I'm using IE 6.3 when I used this command it redirect to the home page and I'm already log on to that page

    F 1 Reply Last reply
    0
    • V vanhawk

      Does the javascript:window.close() closed the session. I'm using IE 6.3 when I used this command it redirect to the home page and I'm already log on to that page

      F Offline
      F Offline
      Fred_Smith
      wrote on last edited by
      #2

      vanhawk wrote:

      Does the javascript:window.close() closed the session

      If it's the only window open at the time, then yes, it will. Otherwise, no.

      vanhawk wrote:

      when I used this command it redirect to the home page

      huh.. are you closing or redirecting? My install of IE has somehow got itself into a state whereby if I only have one window/instance/tab (IE7) of it open, and from that open either a popup (window.open(....)) or a new window (target="_bkank") via a link on that page, then close that second window, I find that my Session has been lost on the first app. I can work around it by always opening a second tab and just leaving it on About:blank or something, but it's a weird bug of some sort in my installation - maybe worth looking out for... Fred

      V 1 Reply Last reply
      0
      • F Fred_Smith

        vanhawk wrote:

        Does the javascript:window.close() closed the session

        If it's the only window open at the time, then yes, it will. Otherwise, no.

        vanhawk wrote:

        when I used this command it redirect to the home page

        huh.. are you closing or redirecting? My install of IE has somehow got itself into a state whereby if I only have one window/instance/tab (IE7) of it open, and from that open either a popup (window.open(....)) or a new window (target="_bkank") via a link on that page, then close that second window, I find that my Session has been lost on the first app. I can work around it by always opening a second tab and just leaving it on About:blank or something, but it's a weird bug of some sort in my installation - maybe worth looking out for... Fred

        V Offline
        V Offline
        vanhawk
        wrote on last edited by
        #3

        Thanks for the reply but, I have to rephrase or change my question. In IE 7 it has a new feature to have a multi-tab on the browser, is there in any command when the user log off on the page it will closed the browser not only the particular tab.

        F 1 Reply Last reply
        0
        • V vanhawk

          Thanks for the reply but, I have to rephrase or change my question. In IE 7 it has a new feature to have a multi-tab on the browser, is there in any command when the user log off on the page it will closed the browser not only the particular tab.

          F Offline
          F Offline
          Fred_Smith
          wrote on last edited by
          #4

          No - and why should there be? If they have other windows open (on other sites) they don't want you to come along and close them! I'd be most annoyed if you did that to me! If you want to end the session yourself, then use the Session.Abandon and/or Session.Clear methods. Fred

          V 1 Reply Last reply
          0
          • F Fred_Smith

            No - and why should there be? If they have other windows open (on other sites) they don't want you to come along and close them! I'd be most annoyed if you did that to me! If you want to end the session yourself, then use the Session.Abandon and/or Session.Clear methods. Fred

            V Offline
            V Offline
            vanhawk
            wrote on last edited by
            #5

            we use the code javascript:window.close() to close the browser in IE 6 we try to use the same code IE 7 and i have 2 different site opened in one browser one site has a login page and i try to log out that page. there is another tab that was open then i try to go back to the page i already log out, when i click the page on the url it open again without going to login page. anyway thanks for the advised i will try to use the command session.abandon

            G 1 Reply Last reply
            0
            • V vanhawk

              we use the code javascript:window.close() to close the browser in IE 6 we try to use the same code IE 7 and i have 2 different site opened in one browser one site has a login page and i try to log out that page. there is another tab that was open then i try to go back to the page i already log out, when i click the page on the url it open again without going to login page. anyway thanks for the advised i will try to use the command session.abandon

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              Closing the window doesn't end the session on the server, so you have had the sample problem all along, only you haven't noticed it because it's not as simple to keep several windows open in IE6 as in IE7.

              --- single minded; short sighted; long gone;

              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