meaning of statement "window.opener = top;"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt

    meaning of statement "window.opener = top;"

    When I do the following, the mycode will still execute. The reason I put
    window.opener=t op; is to disable the close confirmation dialog box.

    window.opener = top;
    window.close();
    //mycode...

    But if I do the following without statement window.opener = top;

    window.close();
    //mycode...

    Then mycode will not be executed.

    any ideas why? please advise. thanks!!
  • Thomas 'PointedEars' Lahn

    #2
    Re: meaning of statement "window.op ener = top;"

    Matt wrote:[color=blue]
    > When I do the following, the mycode will still execute. The reason I put
    > window.opener=t op; is to disable the close confirmation dialog box.[/color]

    It is using a security bug in some UAs and manipulating the
    environment of the user is at least considered bad style.
    [color=blue]
    > [...]
    > But if I do the following without statement window.opener = top;
    >
    > window.close();
    > //mycode...
    >
    > Then mycode will not be executed.
    >
    > any ideas why?[/color]

    Because you close the window and thus the global context ends.
    [color=blue]
    > please advise. thanks!![/color]

    RTFM, RTFFAQ.


    PointedEars

    Comment

    • Matt

      #3
      Re: meaning of statement "window.op ener = top;"

      Thomas wrote:
      [color=blue]
      > Matt wrote:[color=green]
      > > When I do the following, the mycode will still execute. The reason I put
      > > window.opener=t op; is to disable the close confirmation dialog box.[/color]
      >
      > It is using a security bug in some UAs and manipulating the
      > environment of the user is at least considered bad style.
      >[/color]

      so do you have some good suggestions? Please advise. thanks!!

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: meaning of statement "window.op ener = top;"

        Matt wrote:[color=blue]
        > Thomas wrote:[color=green]
        >> Matt wrote:[color=darkred]
        >> > When I do the following, the mycode will still execute. The reason I put
        >> > window.opener=t op; is to disable the close confirmation dialog box.[/color]
        >>
        >> It is using a security bug in some UAs and manipulating the
        >> environment of the user is at least considered bad style.[/color]
        >
        > so do you have some good suggestions? Please advise. thanks!![/color]

        Why should I support bad style? Why should I help with what can be
        considered breaking a law in some countries? Can you tell me that?


        PointedEars

        Comment

        • bruce

          #5
          Re: meaning of statement "window.op ener = top;"

          jrefactors@hotm ail.com (Matt) wrote in message news:<ba8a039e. 0407271906.cc99 b91@posting.goo gle.com>...[color=blue]
          > When I do the following, the mycode will still execute. The reason I put
          > window.opener=t op; is to disable the close confirmation dialog box.
          >
          > window.opener = top;
          > window.close();
          > //mycode...
          >
          > But if I do the following without statement window.opener = top;
          >
          > window.close();
          > //mycode...
          >
          > Then mycode will not be executed.
          >
          > any ideas why? please advise. thanks!![/color]


          Matt, I might not be able to solve your problem, but i thank you
          for solving mine! The user was annoyed at the close confirmation box,
          and you just gave me a way of eliminating it. We're strictly an IE
          shop here, so hopefully it will work fine in production.

          As for this Big Ears guy, who thinks he knows exactly what every
          single user in existence needs and wants, maybe he should tell my user
          what he "really" wants and needs. People like him did great damage to
          our industry with his pompous and condescending attitude. The
          industry and this newsgroup can certainly benefit by his absence.

          Comment

          • Grant Wagner

            #6
            Re: meaning of statement &quot;window.op ener = top;&quot;

            bruce wrote:
            [color=blue]
            > jrefactors@hotm ail.com (Matt) wrote in message news:<ba8a039e. 0407271906.cc99 b91@posting.goo gle.com>...[color=green]
            > > When I do the following, the mycode will still execute. The reason I put
            > > window.opener=t op; is to disable the close confirmation dialog box.
            > >
            > > window.opener = top;
            > > window.close();
            > > //mycode...
            > >
            > > But if I do the following without statement window.opener = top;
            > >
            > > window.close();
            > > //mycode...
            > >
            > > Then mycode will not be executed.
            > >
            > > any ideas why? please advise. thanks!![/color]
            >
            > Matt, I might not be able to solve your problem, but i thank you
            > for solving mine! The user was annoyed at the close confirmation box,
            > and you just gave me a way of eliminating it. We're strictly an IE
            > shop here, so hopefully it will work fine in production.[/color]

            It will work fine until Microsoft decides to fix the bug that allows the code to work. At which point it
            will simply stop working, and you'll be left wondering why and scrambling to figure out how to "work around
            it".
            [color=blue]
            > As for this Big Ears guy, who thinks he knows exactly what every
            > single user in existence needs and wants, maybe he should tell my user
            > what he "really" wants and needs. People like him did great damage to
            > our industry with his pompous and condescending attitude. The
            > industry and this newsgroup can certainly benefit by his absence.[/color]

            Maybe you should explain the limitations of Web-based applications more clearly to your user, explain that
            you don't have the same level of control over the client software as you do using other technologies, then
            produce a solution that is both acceptable to your client, and does not involve a hack that could
            potentially disappear with any security patch or upgrade for IE that is released.

            --
            Grant Wagner <gwagner@agrico reunited.com>
            comp.lang.javas cript FAQ - http://jibbering.com/faq

            Comment

            • Thomas 'PointedEars' Lahn

              #7
              Re: meaning of statement &quot;window.op ener = top;&quot;

              bruce wrote:[color=blue]
              > [...]
              > As for this Big Ears guy,[/color]

              You do not have any sound arguments, so you think you are required
              to insult people you do not even know, and you think that distorting
              a nickname would be appropriate. Or maybe you do not think at all,
              I do not know and I care less.
              [color=blue]
              > who thinks he knows exactly what every single user in existence needs
              > and wants, maybe he should tell my user what he "really" wants and needs.
              > People like him did great damage to our industry with his pompous and
              > condescending attitude. The industry and this newsgroup can certainly
              > benefit by his absence.[/color]

              You have not the slightest clue what nonsense you have written, but
              you may still find out searching this newsgroup for numerous arguments
              about this topic and similar ones, where not only I participated but
              also other subscribers. As for your customer who most certainly wants
              to provide services to other users, but also wants the confirmation
              box which is in fact an important security feature that prevents users
              from losing their history and control over their software, removed,
              I give you and him/her one more advice to think about:

              The fish must eat the worm, not the fisher.


              PointedEars, Score adjusted

              Comment

              Working...