Can a parent focus/close a child window?

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

    Can a parent focus/close a child window?


    I have a parent window that calls window.open("my url","mywindown ame");

    I would like to do the all (or some) of the following - can someone help?

    From the parent, close the child and...
    From the parent, focus the child...

    Anybody help me?

    Thanks,
    --
    Replies please... via the newsgroup, so everyone can learn...
    Thanks,
    Randell D.


  • Randy Webb

    #2
    Re: Can a parent focus/close a child window?

    Randell D. wrote:[color=blue]
    > I have a parent window that calls window.open("my url","mywindown ame");
    >
    > I would like to do the all (or some) of the following - can someone help?
    >
    > From the parent, close the child and...
    > From the parent, focus the child...
    >[/color]

    mywindowname.cl ose();
    mywindowname.fo cus();

    --
    Randy

    Comment

    • Randy Webb

      #3
      Re: Can a parent focus/close a child window?

      Randell D. wrote:[color=blue]
      > I have a parent window that calls window.open("my url","mywindown ame");
      >
      > I would like to do the all (or some) of the following - can someone help?
      >
      > From the parent, close the child and...
      > From the parent, focus the child...
      >
      > Anybody help me?
      >
      > Thanks,[/color]


      Disregard my last post.

      var myWindowHandle = window.open('my URL','myWindowN ame');

      myWindowHandle. focus();
      myWindowHandle. close();

      The myWindowName can be used with targets:

      <a href="somewhere .html" target="myWindo wName">Somewher e</a>


      --
      Randy

      Comment

      • Randell D.

        #4
        Re: Can a parent focus/close a child window?


        "Randy Webb" <hikksnotathome @aol.com> wrote in message
        news:5vCdnd1Eff NAH57dRVn-hg@comcast.com. ..[color=blue]
        > Randell D. wrote:[color=green]
        > > I have a parent window that calls window.open("my url","mywindown ame");
        > >
        > > I would like to do the all (or some) of the following - can someone[/color][/color]
        help?[color=blue][color=green]
        > >
        > > From the parent, close the child and...
        > > From the parent, focus the child...
        > >
        > > Anybody help me?
        > >
        > > Thanks,[/color]
        >
        >
        > Disregard my last post.
        >
        > var myWindowHandle = window.open('my URL','myWindowN ame');
        >
        > myWindowHandle. focus();
        > myWindowHandle. close();
        >
        > The myWindowName can be used with targets:
        >
        > <a href="somewhere .html" target="myWindo wName">Somewher e</a>
        >
        >
        > --
        > Randy
        >[/color]

        Luvely Juvely... thanks for that
        randelld


        Comment

        Working...