Access child windows without reference

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • itsali
    New Member
    • Aug 2007
    • 4

    #1

    Access child windows without reference

    Hi All,

    Thanks for such a network we have here.

    I need to close all the child windows opened by my parent window using javascript. How do i do that.But i dont have reference to those childs (point to note).Hope there might be a way to do it which resides in your mind.Need some exposure from you . Looking ahead of ur kind response thanks a million .

    Knowledge is what expand , when shared ! (52)
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by itsali
    Hi All,

    Thanks for such a network we have here.

    I need to close all the child windows opened by my parent window using javascript. How do i do that.But i dont have reference to those childs (point to note).Hope there might be a way to do it which resides in your mind.Need some exposure from you . Looking ahead of ur kind response thanks a million .

    Knowledge is what expand , when shared ! (52)

    Welcome to TSDN.
    But I think without having no references you can't do that.
    And I think JavaScript will not that having no references of Children Windows.

    Kind regards,
    Dmjpro.

    Comment

    • itsali
      New Member
      • Aug 2007
      • 4

      #3
      Thanks buddy for ur suggestion on my post. Actually wht matters most is being in the process and i'm in the process of finding an answer to this.

      Thanks & Regards,
      Ali (52)

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by itsali
        Thanks buddy for ur suggestion on my post. Actually wht matters most is being in the process and i'm in the process of finding an answer to this.
        If you have control over the code, why not keep references to the child windows? Show the code you are using.

        Comment

        • markrawlingson
          Recognized Expert Contributor
          • Aug 2007
          • 346

          #5
          You can set the window in an object variable when you open it, and then manipulate it anyway you want to..

          For instance..

          [CODE=javascript]oNewWindow = window.open(sUR L,'newWindow',' toolbar=0,scrol lbars=0,locatio n=0,statusbar=0 ,menubar=0,resi zable=0,width=' +iWidth+',heigh t='+iHeight+',l eft=' + iLeft +',top=' + iTop);

          oNewWindow.clos e()
          [/CODE]
          Give that a shot.
          Last edited by acoder; Aug 30 '07, 08:46 AM. Reason: Added code tags

          Comment

          • dmjpro
            Top Contributor
            • Jan 2007
            • 2476

            #6
            Originally posted by markrawlingson
            You can set the window in an object variable when you open it, and then manipulate it anyway you want to..

            For instance..

            [code=javascript]
            oNewWindow = window.open(sUR L,'newWindow',' toolbar=0,scrol lbars=0,locatio n=0,statusbar=0 ,menubar=0,resi zable=0,width=' +iWidth+',heigh t='+iHeight+',l eft=' + iLeft +',top=' + iTop);

            oNewWindow.clos e()
            [/code]

            Give that a shot.
            Please follow the Post Guidelines while you posting.

            Kind regards,
            Dmjpro.

            Comment

            • itsali
              New Member
              • Aug 2007
              • 4

              #7
              Thanks to everyone who replied to my post .

              But the situation in my scenario is out of my boundries the only option i've is
              to handle the child windows without having any links to them except the parent window who created it.Well lets see wht cld be done for it.Anyways thanks again.(52)

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Originally posted by itsali
                But the situation in my scenario is out of my boundries the only option i've is
                to handle the child windows without having any links to them except the parent window who created it.Well lets see wht cld be done for it.
                Why can't you change the code in the parent window?

                PS. what's this number 52 that you put at the end of each post?

                Comment

                Working...